LibWeb: Make WebGL extensions creation agnostic of WebGL version

This commit is contained in:
Undefine
2026-03-05 19:37:33 +01:00
committed by Jelle Raaijmakers
parent 502f2618aa
commit 5a029b4533
Notes: github-actions[bot] 2026-03-11 19:21:54 +00:00
25 changed files with 58 additions and 57 deletions

View File

@@ -9,7 +9,7 @@
#include <LibWeb/Bindings/WebGLDrawBuffersPrototype.h>
#include <LibWeb/WebGL/Extensions/WebGLDrawBuffers.h>
#include <LibWeb/WebGL/OpenGLContext.h>
#include <LibWeb/WebGL/WebGLRenderingContext.h>
#include <LibWeb/WebGL/WebGLRenderingContextBase.h>
#define GL_GLEXT_PROTOTYPES 1
#include <GLES2/gl2.h>
@@ -19,12 +19,12 @@ namespace Web::WebGL::Extensions {
GC_DEFINE_ALLOCATOR(WebGLDrawBuffers);
JS::ThrowCompletionOr<GC::Ptr<WebGLDrawBuffers>> WebGLDrawBuffers::create(JS::Realm& realm, GC::Ref<WebGLRenderingContext> context)
JS::ThrowCompletionOr<GC::Ptr<WebGLDrawBuffers>> WebGLDrawBuffers::create(JS::Realm& realm, GC::Ref<WebGLRenderingContextBase> context)
{
return realm.create<WebGLDrawBuffers>(realm, context);
}
WebGLDrawBuffers::WebGLDrawBuffers(JS::Realm& realm, GC::Ref<WebGLRenderingContext> context)
WebGLDrawBuffers::WebGLDrawBuffers(JS::Realm& realm, GC::Ref<WebGLRenderingContextBase> context)
: PlatformObject(realm)
, m_context(context)
{