LibWeb/WebGL: Set prototypes of the WebGL objects

This commit is contained in:
Luke Wilde 2024-12-05 15:13:02 +00:00 committed by Alexander Kalenik
commit a14cd5dab8
Notes: github-actions[bot] 2024-12-05 20:42:31 +00:00
17 changed files with 120 additions and 27 deletions

View file

@ -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 };
};
}