Texture.h 732 B

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