diff options
author | 2016-03-08 11:44:52 +0100 | |
---|---|---|
committer | 2016-03-08 12:58:10 +0100 | |
commit | 6412c5e0763dc079312cd5c81cb077d0c393b2b4 (patch) | |
tree | ed41c94128216146df63c43cd8a5965897557175 /3rdparty/bgfx/tools/texturec/texturec.cpp | |
parent | 1f352c6af853e5cb0dc06ea6596be77db953a9fd (diff) |
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/tools/texturec/texturec.cpp')
-rw-r--r-- | 3rdparty/bgfx/tools/texturec/texturec.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp index 81bccfeb6f6..35983dc9849 100644 --- a/3rdparty/bgfx/tools/texturec/texturec.cpp +++ b/3rdparty/bgfx/tools/texturec/texturec.cpp @@ -27,8 +27,8 @@ #endif // DEBUG #include <bx/bx.h> -#include <bx/allocator.h> #include <bx/commandline.h> +#include <bx/crtimpl.h> #include <bx/uint32_t.h> namespace bgfx @@ -117,7 +117,7 @@ namespace bgfx case TextureFormat::PTC14: { using namespace Javelin; - RgbBitmap bmp; + RgbaBitmap bmp; bmp.width = _width; bmp.height = _height; bmp.data = (uint8_t*)const_cast<void*>(_src); @@ -511,6 +511,8 @@ int main(int _argc, const char* _argv[]) { imageRgba32fDownsample2x2NormalMap(mip.m_width, mip.m_height, mip.m_width*16, rgba, rgba); imageRgba32f11to01(rgbaDst, mip.m_width, mip.m_height, mip.m_width*16, rgba); + mip.m_width = bx::uint32_max(1, mip.m_width >> 1); + mip.m_height = bx::uint32_max(1, mip.m_height >> 1); ImageMip dstMip; imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip); @@ -541,6 +543,8 @@ int main(int _argc, const char* _argv[]) for (uint8_t lod = 1; lod < numMips; ++lod) { imageRgba8Downsample2x2(mip.m_width, mip.m_height, mip.m_width*4, rgba, rgba); + mip.m_width = bx::uint32_max(1, mip.m_width >> 1); + mip.m_height = bx::uint32_max(1, mip.m_height >> 1); ImageMip dstMip; imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip); |