mirror of
https://github.com/bkaradzic/bimg.git
synced 2026-02-17 20:52:38 +01:00
Fix ktx cubemap size calculation
Change was introduced by commit #63 (b8a7a90)
This commit is contained in:
committed by
GitHub
parent
c4941995d3
commit
6c6bb12137
@@ -5049,7 +5049,7 @@ namespace bimg
|
||||
|
||||
if (_imageContainer.m_ktx)
|
||||
{
|
||||
const uint32_t size = mipSize * ((_imageContainer.m_numLayers<=1 && _imageContainer.m_cubeMap) ? 1 : numSides);
|
||||
const uint32_t size = mipSize * numSides;
|
||||
uint32_t imageSize = bx::toHostEndian(*(const uint32_t*)&data[offset], _imageContainer.m_ktxLE);
|
||||
BX_ASSERT(size == imageSize, "KTX: Image size mismatch %d (expected %d).", size, imageSize);
|
||||
BX_UNUSED(size, imageSize);
|
||||
|
||||
Reference in New Issue
Block a user