LibWeb: Implement the OES_element_index_uint WebGL extension

This commit is contained in:
Undefine
2025-11-30 20:38:41 +01:00
committed by Andrew Kaster
parent c37f1160fe
commit 3c4a31bca7
Notes: github-actions[bot] 2026-02-06 10:39:42 +00:00
8 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2025, Undefine <undefine@undefine.pl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/Forward.h>
namespace Web::WebGL::Extensions {
class OESElementIndexUint : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(OESElementIndexUint, Bindings::PlatformObject);
GC_DECLARE_ALLOCATOR(OESElementIndexUint);
public:
static JS::ThrowCompletionOr<GC::Ptr<OESElementIndexUint>> create(JS::Realm&, GC::Ref<WebGLRenderingContext>);
protected:
void initialize(JS::Realm&) override;
void visit_edges(Visitor&) override;
private:
OESElementIndexUint(JS::Realm&, GC::Ref<WebGLRenderingContext>);
GC::Ref<WebGLRenderingContext> m_context;
};
}