WebGLObject.h 649 B

1234567891011121314151617181920212223242526272829303132
  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. namespace Web::WebGL {
  9. class WebGLObject : public Bindings::PlatformObject {
  10. WEB_PLATFORM_OBJECT(WebGLRenderingContextBase, Bindings::PlatformObject);
  11. public:
  12. virtual ~WebGLObject();
  13. String label() const { return m_label; }
  14. void set_label(String const& label) { m_label = label; }
  15. protected:
  16. explicit WebGLObject(JS::Realm&);
  17. bool invalidated() const { return m_invalidated; }
  18. private:
  19. bool m_invalidated { false };
  20. String m_label;
  21. };
  22. }