2025-11-30 16:38:41 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2025, Undefine <undefine@undefine.pl>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/Realm.h>
|
|
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2026-04-18 05:54:06 -03:00
|
|
|
#include <LibWeb/Bindings/OESElementIndexUint.h>
|
2025-11-30 16:38:41 -03:00
|
|
|
#include <LibWeb/WebGL/Extensions/OESElementIndexUint.h>
|
|
|
|
|
#include <LibWeb/WebGL/OpenGLContext.h>
|
2026-03-05 15:37:33 -03:00
|
|
|
#include <LibWeb/WebGL/WebGLRenderingContextBase.h>
|
2025-11-30 16:38:41 -03:00
|
|
|
|
2026-04-22 10:33:59 -03:00
|
|
|
namespace Web::WebGL {
|
2025-11-30 16:38:41 -03:00
|
|
|
|
|
|
|
|
GC_DEFINE_ALLOCATOR(OESElementIndexUint);
|
|
|
|
|
|
2026-03-05 16:47:29 -03:00
|
|
|
JS::ThrowCompletionOr<GC::Ref<JS::Object>> OESElementIndexUint::create(JS::Realm& realm, GC::Ref<WebGLRenderingContextBase> context)
|
2025-11-30 16:38:41 -03:00
|
|
|
{
|
|
|
|
|
return realm.create<OESElementIndexUint>(realm, context);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-05 15:37:33 -03:00
|
|
|
OESElementIndexUint::OESElementIndexUint(JS::Realm& realm, GC::Ref<WebGLRenderingContextBase> context)
|
2025-11-30 16:38:41 -03:00
|
|
|
: PlatformObject(realm)
|
|
|
|
|
, m_context(context)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OESElementIndexUint::initialize(JS::Realm& realm)
|
|
|
|
|
{
|
|
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(OESElementIndexUint);
|
|
|
|
|
Base::initialize(realm);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OESElementIndexUint::visit_edges(Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
|
visitor.visit(m_context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|