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
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

@ -8,6 +8,9 @@
#include <LibWeb/Bindings/PlatformObject.h>
typedef unsigned int GLenum;
typedef int GLsizei;
namespace Web::WebGL {
class WebGLActiveInfo : public Bindings::PlatformObject {
@ -15,10 +18,22 @@ class WebGLActiveInfo : public Bindings::PlatformObject {
GC_DECLARE_ALLOCATOR(WebGLActiveInfo);
public:
static GC::Ptr<WebGLActiveInfo> create(JS::Realm&, String name, GLenum type, GLsizei size);
virtual ~WebGLActiveInfo();
GLsizei size() const { return m_size; }
GLenum type() const { return m_type; }
String const& name() const { return m_name; }
protected:
explicit WebGLActiveInfo(JS::Realm&);
explicit WebGLActiveInfo(JS::Realm&, String name, GLenum type, GLsizei size);
private:
virtual void initialize(JS::Realm&) override;
String m_name;
GLenum m_type { 0 };
GLsizei m_size { 0 };
};
}