From f0f0d084171d1ee1126030239baccf872411383b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 2 Feb 2015 20:42:59 -0800 Subject: [PATCH] Fixed texture info. --- src/bgfx.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 2d41903c..21a98eab 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2318,11 +2318,14 @@ again: const uint32_t minBlockX = blockInfo.minBlockX; const uint32_t minBlockY = blockInfo.minBlockY; + _width = bx::uint32_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth)*blockWidth); + _height = bx::uint32_max(blockHeight * minBlockY, ( (_height + blockHeight - 1) / blockHeight)*blockHeight); + _depth = bx::uint32_max(1, _depth); _numMips = bx::uint32_max(1, _numMips); - uint32_t width = bx::uint32_max(1, _width); - uint32_t height = bx::uint32_max(1, _height); - uint32_t depth = bx::uint32_max(1, _depth); + uint32_t width = _width; + uint32_t height = _height; + uint32_t depth = _depth; uint32_t size = 0; for (uint32_t lod = 0; lod < _numMips; ++lod)