LibWeb/WebGL: Implement getActiveAttrib() and getActiveUniform()

This commit is contained in:
Aliaksandr Kalenik 2024-12-01 00:10:44 +01:00 committed by Alexander Kalenik
parent f3a24d1569
commit 3c2ac309ca
Notes: github-actions[bot] 2024-12-03 22:36:52 +00:00
5 changed files with 67 additions and 7 deletions

View file

@ -4,17 +4,34 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/Realm.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/WebGLActiveInfoPrototype.h>
#include <LibWeb/WebGL/WebGLActiveInfo.h>
namespace Web::WebGL {
GC_DEFINE_ALLOCATOR(WebGLActiveInfo);
WebGLActiveInfo::WebGLActiveInfo(JS::Realm& realm)
GC::Ptr<WebGLActiveInfo> WebGLActiveInfo::create(JS::Realm& realm, String name, GLenum type, GLsizei size)
{
return realm.create<WebGLActiveInfo>(realm, move(name), type, size);
}
WebGLActiveInfo::WebGLActiveInfo(JS::Realm& realm, String name, GLenum type, GLsizei size)
: Bindings::PlatformObject(realm)
, m_name(move(name))
, m_type(type)
, m_size(size)
{
}
WebGLActiveInfo::~WebGLActiveInfo() = default;
void WebGLActiveInfo::initialize(JS::Realm& realm)
{
Base::initialize(realm);
WEB_SET_PROTOTYPE_FOR_INTERFACE(WebGLActiveInfo);
}
}