summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/bgfx_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/common/bgfx_utils.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/bgfx_utils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.cpp b/3rdparty/bgfx/examples/common/bgfx_utils.cpp
index 18db066f468..6f2d29f0fef 100644
--- a/3rdparty/bgfx/examples/common/bgfx_utils.cpp
+++ b/3rdparty/bgfx/examples/common/bgfx_utils.cpp
@@ -240,6 +240,8 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
break;
case LCT_PALETTE:
+ format = bgfx::TextureFormat::R8;
+ bpp = 8;
break;
}
break;
@@ -304,7 +306,7 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
if (NULL != out)
{
- handle = bgfx::createTexture2D(uint16_t(width), uint16_t(height), 1
+ handle = bgfx::createTexture2D(uint16_t(width), uint16_t(height), false, 1
, format
, _flags
, bgfx::copy(out, width*height*bpp/8)
@@ -318,6 +320,7 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
, uint16_t(height)
, 0
, false
+ , false
, 1
, format
);