diff options
author | 2016-02-18 15:57:34 +0100 | |
---|---|---|
committer | 2016-02-21 03:03:23 +0100 | |
commit | 9a47a870df619656e9092f2f77622e84e640307a (patch) | |
tree | b8640bf79ffb55d0c9ed6fc27bbd4ce16a5e1a2e /src/osd/modules/render/bgfx/texture.h | |
parent | dadf8e7d79696996ab3ef840fe99a588ede538fa (diff) |
First take on render API reorg, nw
Diffstat (limited to 'src/osd/modules/render/bgfx/texture.h')
-rw-r--r-- | src/osd/modules/render/bgfx/texture.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/texture.h b/src/osd/modules/render/bgfx/texture.h new file mode 100644 index 00000000000..a612b6e8dbf --- /dev/null +++ b/src/osd/modules/render/bgfx/texture.h @@ -0,0 +1,31 @@ +#pragma once + +#ifndef __DRAWBGFX_TEXTURE__ +#define __DRAWBGFX_TEXTURE__ + +#include <bgfx/bgfx.h> + +#include <string> + +class bgfx_texture +{ +public: + bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data = nullptr, 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; } + +protected: + std::string m_name; + bgfx::TextureFormat::Enum m_format; + uint32_t m_width; + uint32_t m_height; + bgfx::TextureHandle m_handle; +}; + +#endif // __DRAWBGFX_TEXTURE__
\ No newline at end of file |