diff options
author | 2016-08-06 14:20:16 +0200 | |
---|---|---|
committer | 2016-08-06 14:20:16 +0200 | |
commit | 3917850b6197950e5671f4d3b9cb0b9c921b798d (patch) | |
tree | 503b9690868a7c238ba10d73b5c6bece7ca8c338 /3rdparty/bgfx/tools/texturec/texturec.cpp | |
parent | 057474989c1a92e9e935dbc8cb9d233ba3a4ea3a (diff) |
Update BX and BGFX (nw)
Diffstat (limited to '3rdparty/bgfx/tools/texturec/texturec.cpp')
-rw-r--r-- | 3rdparty/bgfx/tools/texturec/texturec.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp index c1c271fddbc..687ccf82fdb 100644 --- a/3rdparty/bgfx/tools/texturec/texturec.cpp +++ b/3rdparty/bgfx/tools/texturec/texturec.cpp @@ -570,10 +570,13 @@ int main(int _argc, const char* _argv[]) const bool normalMap = cmdLine.hasArg('n', "normalmap"); const bool iqa = cmdLine.hasArg('\0', "iqa"); - uint32_t size = (uint32_t)bx::getSize(&reader); - const bgfx::Memory* mem = bgfx::alloc(size); - bx::read(&reader, mem->data, mem->size); - bx::close(&reader); + const bgfx::Memory* mem; + { + uint32_t size = (uint32_t)bx::getSize(&reader); + mem = bgfx::alloc(size); + bx::read(&reader, mem->data, mem->size); + bx::close(&reader); + } { using namespace bgfx; |