Bläddra i källkod

Fixed texture info.

Branimir Karadžić 11 år sedan
förälder
incheckning
f0f0d08417
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      src/bgfx.cpp

+ 6 - 3
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)