WebGLTexture.h 726 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 WebGLTexture final : public WebGLObject {
  13. WEB_PLATFORM_OBJECT(WebGLTexture, WebGLObject);
  14. GC_DECLARE_ALLOCATOR(WebGLTexture);
  15. public:
  16. static GC::Ref<WebGLTexture> create(JS::Realm& realm, GLuint handle);
  17. virtual ~WebGLTexture();
  18. protected:
  19. explicit WebGLTexture(JS::Realm&, GLuint handle);
  20. virtual void initialize(JS::Realm&) override;
  21. };
  22. }