mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed mip calculation.
This commit is contained in:
parent
4b5159394c
commit
82216b2176
1 changed files with 2 additions and 2 deletions
|
@ -1636,8 +1636,8 @@ namespace bgfx
|
|||
// skip imageSize in KTX format.
|
||||
offset += _imageContainer.m_ktx ? sizeof(uint32_t) : 0;
|
||||
|
||||
width = bx::uint32_max(blockWidth, width);
|
||||
height = bx::uint32_max(blockHeight, height);
|
||||
width = bx::uint32_max(blockWidth, ( (width +blockWidth -1)/blockWidth )*blockWidth);
|
||||
height = bx::uint32_max(blockHeight, ( (height+blockHeight-1)/blockHeight)*blockHeight);
|
||||
depth = bx::uint32_max(1, depth);
|
||||
|
||||
uint32_t size = width*height*depth*bpp/8;
|
||||
|
|
Loading…
Reference in a new issue