WebGLActiveInfo.h 923 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Bindings/PlatformObject.h>
  8. typedef unsigned int GLenum;
  9. typedef int GLsizei;
  10. namespace Web::WebGL {
  11. class WebGLActiveInfo : public Bindings::PlatformObject {
  12. WEB_PLATFORM_OBJECT(WebGLActiveInfo, Bindings::PlatformObject);
  13. GC_DECLARE_ALLOCATOR(WebGLActiveInfo);
  14. public:
  15. static GC::Ptr<WebGLActiveInfo> create(JS::Realm&, String name, GLenum type, GLsizei size);
  16. virtual ~WebGLActiveInfo();
  17. GLsizei size() const { return m_size; }
  18. GLenum type() const { return m_type; }
  19. String const& name() const { return m_name; }
  20. protected:
  21. explicit WebGLActiveInfo(JS::Realm&, String name, GLenum type, GLsizei size);
  22. private:
  23. virtual void initialize(JS::Realm&) override;
  24. String m_name;
  25. GLenum m_type { 0 };
  26. GLsizei m_size { 0 };
  27. };
  28. }