WebGLProgram.h 782 B

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