Texture.h 773 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
  3. * Copyright (c) 2022, the SerenityOS developers.
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/RefCounted.h>
  9. #include <LibGPU/Image.h>
  10. namespace GL {
  11. class Texture : public RefCounted<Texture> {
  12. public:
  13. virtual ~Texture() = default;
  14. virtual bool is_texture_1d() const { return false; }
  15. virtual bool is_texture_2d() const { return false; }
  16. virtual bool is_texture_3d() const { return false; }
  17. virtual bool is_cube_map() const { return false; }
  18. RefPtr<GPU::Image> device_image() { return m_device_image; }
  19. void set_device_image(RefPtr<GPU::Image> image) { m_device_image = image; }
  20. private:
  21. RefPtr<GPU::Image> m_device_image;
  22. };
  23. }