WebGLUniformLocation.h 828 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
  3. * Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <LibWeb/Bindings/PlatformObject.h>
  9. #include <LibWeb/WebGL/Types.h>
  10. namespace Web::WebGL {
  11. class WebGLUniformLocation final : public Bindings::PlatformObject {
  12. WEB_PLATFORM_OBJECT(WebGLUniformLocation, Bindings::PlatformObject);
  13. GC_DECLARE_ALLOCATOR(WebGLUniformLocation);
  14. public:
  15. static GC::Ref<WebGLUniformLocation> create(JS::Realm& realm, GLuint handle);
  16. virtual ~WebGLUniformLocation();
  17. GLuint handle() const { return m_handle; }
  18. protected:
  19. explicit WebGLUniformLocation(JS::Realm&, GLuint handle);
  20. virtual void initialize(JS::Realm&) override;
  21. GLuint m_handle { 0 };
  22. };
  23. }