Skip to content

Commit

Permalink
Merge pull request #64 from goodartistscopy/patch-1
Browse files Browse the repository at this point in the history
Fix ktx cubemap size calculation
  • Loading branch information
bkaradzic authored Oct 26, 2021
2 parents c494199 + 6c6bb12 commit 9e4d2b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9e4d2b1

Please sign in to comment.