mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb/WebGL: Set prototypes of the WebGL objects
This commit is contained in:
committed by
Alexander Kalenik
parent
2e1702a14b
commit
a14cd5dab8
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/WebGLProgramPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||
|
||||
@@ -13,9 +15,9 @@ namespace Web::WebGL {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(WebGLProgram);
|
||||
|
||||
GC::Ptr<WebGLProgram> WebGLProgram::create(JS::Realm& realm, GLuint handle)
|
||||
GC::Ref<WebGLProgram> WebGLProgram::create(JS::Realm& realm, GLuint handle)
|
||||
{
|
||||
return realm.heap().allocate<WebGLProgram>(realm, handle);
|
||||
return realm.create<WebGLProgram>(realm, handle);
|
||||
}
|
||||
|
||||
WebGLProgram::WebGLProgram(JS::Realm& realm, GLuint handle)
|
||||
@@ -25,4 +27,10 @@ WebGLProgram::WebGLProgram(JS::Realm& realm, GLuint handle)
|
||||
|
||||
WebGLProgram::~WebGLProgram() = default;
|
||||
|
||||
void WebGLProgram::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLProgram);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user