summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/bgfx_utils.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-09-03 13:30:42 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-09-03 13:30:42 +0200
commitd193abb0ad0827d5ecc0915d65b67faf68a87097 (patch)
tree9a750cfbd4d229c4607f4d9aaf76dea89944a0bd /3rdparty/bgfx/examples/common/bgfx_utils.cpp
parentd8cd5ca1346607349be6777d29358acef1e4517c (diff)
Update BGFX and BX packages and update MAME code to support new API (nw)
Generated missing shaders (nw)
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
);