diff options
Diffstat (limited to 'src/osd/modules/render/bgfx/texture.cpp')
-rw-r--r-- | src/osd/modules/render/bgfx/texture.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/osd/modules/render/bgfx/texture.cpp b/src/osd/modules/render/bgfx/texture.cpp index 31032cab0c6..bd69e18e424 100644 --- a/src/osd/modules/render/bgfx/texture.cpp +++ b/src/osd/modules/render/bgfx/texture.cpp @@ -10,7 +10,7 @@ #include "texture.h" -bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, uint32_t flags, void* data) +bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, uint32_t flags, void* data) : m_name(name) , m_format(format) , m_width(width) @@ -20,19 +20,19 @@ bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, u bgfx::calcTextureSize(info, width, height, 1, false, 1, format); if (data != nullptr) { - m_handle = bgfx::createTexture2D(width, height, 1, format, flags, bgfx::copy(data, info.storageSize)); + m_texture = bgfx::createTexture2D(width, height, 1, format, flags, bgfx::copy(data, info.storageSize)); } else { - m_handle = bgfx::createTexture2D(width, height, 1, format, flags); + m_texture = bgfx::createTexture2D(width, height, 1, format, flags); const bgfx::Memory* memory = bgfx::alloc(info.storageSize); memset(memory->data, 0, info.storageSize); - bgfx::updateTexture2D(m_handle, 0, 0, 0, width, height, memory, info.storageSize / height); + bgfx::updateTexture2D(m_texture, 0, 0, 0, width, height, memory, info.storageSize / height); } } -bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, const bgfx::Memory* data, uint32_t flags) +bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, uint16_t width, uint16_t height, const bgfx::Memory* data, uint32_t flags) : m_name(name) , m_format(format) , m_width(width) @@ -40,10 +40,10 @@ bgfx_texture::bgfx_texture(std::string name, bgfx::TextureFormat::Enum format, u { bgfx::TextureInfo info; bgfx::calcTextureSize(info, width, height, 1, false, 1, format); - m_handle = bgfx::createTexture2D(width, height, 1, format, flags, data); + m_texture = bgfx::createTexture2D(width, height, 1, format, flags, data); } bgfx_texture::~bgfx_texture() { - bgfx::destroyTexture(m_handle); + bgfx::destroyTexture(m_texture); } |