mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-05 09:52:54 +00:00
LibWeb/WebGL: Add stub class for WebGLTransformFeedback
This is a WebGL 2.0 class
This commit is contained in:
parent
bb3226ee57
commit
39018d233f
Notes:
github-actions[bot]
2024-12-06 14:37:04 +00:00
Author: https://github.com/ADKaster
Commit: 39018d233f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2809
Reviewed-by: https://github.com/kalenikaliaksandr ✅
6 changed files with 72 additions and 0 deletions
|
@ -819,6 +819,7 @@ set(SOURCES
|
||||||
WebGL/WebGLShaderPrecisionFormat.cpp
|
WebGL/WebGLShaderPrecisionFormat.cpp
|
||||||
WebGL/WebGLSync.cpp
|
WebGL/WebGLSync.cpp
|
||||||
WebGL/WebGLTexture.cpp
|
WebGL/WebGLTexture.cpp
|
||||||
|
WebGL/WebGLTransformFeedback.cpp
|
||||||
WebGL/WebGLUniformLocation.cpp
|
WebGL/WebGLUniformLocation.cpp
|
||||||
WebIDL/AbstractOperations.cpp
|
WebIDL/AbstractOperations.cpp
|
||||||
WebIDL/Buffers.cpp
|
WebIDL/Buffers.cpp
|
||||||
|
|
34
Libraries/LibWeb/WebGL/WebGLTransformFeedback.cpp
Normal file
34
Libraries/LibWeb/WebGL/WebGLTransformFeedback.cpp
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibJS/Runtime/Realm.h>
|
||||||
|
#include <LibWeb/Bindings/Intrinsics.h>
|
||||||
|
#include <LibWeb/Bindings/WebGLTransformFeedbackPrototype.h>
|
||||||
|
#include <LibWeb/WebGL/WebGLTransformFeedback.h>
|
||||||
|
|
||||||
|
namespace Web::WebGL {
|
||||||
|
|
||||||
|
GC_DEFINE_ALLOCATOR(WebGLTransformFeedback);
|
||||||
|
|
||||||
|
GC::Ref<WebGLTransformFeedback> WebGLTransformFeedback::create(JS::Realm& realm, GLuint handle)
|
||||||
|
{
|
||||||
|
return realm.create<WebGLTransformFeedback>(realm, handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
WebGLTransformFeedback::WebGLTransformFeedback(JS::Realm& realm, GLuint handle)
|
||||||
|
: WebGLObject(realm, handle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WebGLTransformFeedback::~WebGLTransformFeedback() = default;
|
||||||
|
|
||||||
|
void WebGLTransformFeedback::initialize(JS::Realm& realm)
|
||||||
|
{
|
||||||
|
Base::initialize(realm);
|
||||||
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLTransformFeedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
29
Libraries/LibWeb/WebGL/WebGLTransformFeedback.h
Normal file
29
Libraries/LibWeb/WebGL/WebGLTransformFeedback.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <LibWeb/WebGL/Types.h>
|
||||||
|
#include <LibWeb/WebGL/WebGLObject.h>
|
||||||
|
|
||||||
|
namespace Web::WebGL {
|
||||||
|
|
||||||
|
class WebGLTransformFeedback : public WebGLObject {
|
||||||
|
WEB_PLATFORM_OBJECT(WebGLTransformFeedback, WebGLObject);
|
||||||
|
GC_DECLARE_ALLOCATOR(WebGLTransformFeedback);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static GC::Ref<WebGLTransformFeedback> create(JS::Realm& realm, GLuint handle);
|
||||||
|
|
||||||
|
virtual ~WebGLTransformFeedback() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
explicit WebGLTransformFeedback(JS::Realm&, GLuint handle);
|
||||||
|
|
||||||
|
virtual void initialize(JS::Realm&) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
6
Libraries/LibWeb/WebGL/WebGLTransformFeedback.idl
Normal file
6
Libraries/LibWeb/WebGL/WebGLTransformFeedback.idl
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#import <WebGL/WebGLObject.idl>
|
||||||
|
|
||||||
|
// https://registry.khronos.org/webgl/specs/latest/2.0/#3.5
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface WebGLTransformFeedback : WebGLObject {
|
||||||
|
};
|
|
@ -383,6 +383,7 @@ libweb_js_bindings(WebGL/WebGLShader)
|
||||||
libweb_js_bindings(WebGL/WebGLShaderPrecisionFormat)
|
libweb_js_bindings(WebGL/WebGLShaderPrecisionFormat)
|
||||||
libweb_js_bindings(WebGL/WebGLSync)
|
libweb_js_bindings(WebGL/WebGLSync)
|
||||||
libweb_js_bindings(WebGL/WebGLTexture)
|
libweb_js_bindings(WebGL/WebGLTexture)
|
||||||
|
libweb_js_bindings(WebGL/WebGLTransformFeedback)
|
||||||
libweb_js_bindings(WebGL/WebGLUniformLocation)
|
libweb_js_bindings(WebGL/WebGLUniformLocation)
|
||||||
libweb_js_bindings(WebIDL/DOMException)
|
libweb_js_bindings(WebIDL/DOMException)
|
||||||
libweb_js_bindings(WebSockets/WebSocket)
|
libweb_js_bindings(WebSockets/WebSocket)
|
||||||
|
|
|
@ -412,6 +412,7 @@ WebGLShader
|
||||||
WebGLShaderPrecisionFormat
|
WebGLShaderPrecisionFormat
|
||||||
WebGLSync
|
WebGLSync
|
||||||
WebGLTexture
|
WebGLTexture
|
||||||
|
WebGLTransformFeedback
|
||||||
WebGLUniformLocation
|
WebGLUniformLocation
|
||||||
WebKitCSSMatrix
|
WebKitCSSMatrix
|
||||||
WebSocket
|
WebSocket
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue