mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb/WebGL: Set prototypes of the WebGL objects
This commit is contained in:
parent
2e1702a14b
commit
a14cd5dab8
Notes:
github-actions[bot]
2024-12-05 20:42:31 +00:00
Author: https://github.com/Lubrsi
Commit: a14cd5dab8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2791
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/shannonbooth
17 changed files with 120 additions and 27 deletions
|
@ -7,21 +7,28 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/WebGL/WebGLObject.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/WebGL/Types.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
class WebGLUniformLocation final : public WebGLObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLUniformLocation, WebGLObject);
|
||||
class WebGLUniformLocation final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLUniformLocation, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(WebGLUniformLocation);
|
||||
|
||||
public:
|
||||
static GC::Ptr<WebGLUniformLocation> create(JS::Realm& realm, GLuint handle);
|
||||
static GC::Ref<WebGLUniformLocation> create(JS::Realm& realm, GLuint handle);
|
||||
|
||||
virtual ~WebGLUniformLocation();
|
||||
|
||||
GLuint handle() const { return m_handle; }
|
||||
|
||||
protected:
|
||||
explicit WebGLUniformLocation(JS::Realm&, GLuint handle);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
GLuint m_handle { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue