mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Save OpenGL handle in WebGLObject
This commit is contained in:
committed by
Alexander Kalenik
parent
46cbbda944
commit
cfb394cad3
@@ -1,9 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibWeb/Bindings/WebGLProgramPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||
|
||||
@@ -11,8 +13,13 @@ namespace Web::WebGL {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(WebGLProgram);
|
||||
|
||||
WebGLProgram::WebGLProgram(JS::Realm& realm)
|
||||
: WebGLObject(realm)
|
||||
GC::Ptr<WebGLProgram> WebGLProgram::create(JS::Realm& realm, GLuint handle)
|
||||
{
|
||||
return realm.heap().allocate<WebGLProgram>(realm, handle);
|
||||
}
|
||||
|
||||
WebGLProgram::WebGLProgram(JS::Realm& realm, GLuint handle)
|
||||
: WebGLObject(realm, handle)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user