summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/texture.h')
-rw-r--r--src/osd/modules/render/bgfx/texture.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/osd/modules/render/bgfx/texture.h b/src/osd/modules/render/bgfx/texture.h
index f4b36266ada..bb9e5962337 100644
--- a/src/osd/modules/render/bgfx/texture.h
+++ b/src/osd/modules/render/bgfx/texture.h
@@ -15,27 +15,31 @@
#include <string>
-class bgfx_texture
+#include "texturehandleprovider.h"
+
+class bgfx_texture : public bgfx_texture_handle_provider
{
public:
- bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t flags, void* data);
- bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, const bgfx::Memory* data, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
+ bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t flags, void* data);
+ bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, const bgfx::Memory* data, uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP);
virtual ~bgfx_texture();
// Getters
std::string name() const { return m_name; }
bgfx::TextureFormat::Enum format() const { return m_format; }
- uint32_t width() const { return m_width; }
- uint32_t height() const { return m_height; }
- bgfx::TextureHandle handle() const { return m_handle; }
- virtual bool is_target() const { return false; }
+
+ // bgfx_texture_handle_provider
+ virtual uint16_t width() const override { return m_width; }
+ virtual uint16_t height() const override { return m_height; }
+ virtual bgfx::TextureHandle texture() const override { return m_texture; }
+ virtual bool is_target() const override { return false; }
protected:
std::string m_name;
bgfx::TextureFormat::Enum m_format;
- uint32_t m_width;
- uint32_t m_height;
- bgfx::TextureHandle m_handle;
+ uint16_t m_width;
+ uint16_t m_height;
+ bgfx::TextureHandle m_texture;
};
#endif // __DRAWBGFX_TEXTURE__