LibWeb: Save OpenGL handle in WebGLObject

This commit is contained in:
Aliaksandr Kalenik 2024-11-30 16:53:52 +01:00 committed by Alexander Kalenik
parent 46cbbda944
commit cfb394cad3
Notes: github-actions[bot] 2024-12-03 22:37:03 +00:00
15 changed files with 83 additions and 20 deletions

View file

@ -1,11 +1,13 @@
/*
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/WebGL/Types.h>
#include <LibWeb/WebGL/WebGLObject.h>
namespace Web::WebGL {
@ -15,10 +17,12 @@ class WebGLProgram final : public WebGLObject {
GC_DECLARE_ALLOCATOR(WebGLProgram);
public:
static GC::Ptr<WebGLProgram> create(JS::Realm& realm, GLuint handle);
virtual ~WebGLProgram();
protected:
explicit WebGLProgram(JS::Realm&);
explicit WebGLProgram(JS::Realm&, GLuint handle);
};
}