mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 15:52:53 +00:00
ObjLoading: Fix not being able to load cubemaps due to wrong calculation of mipsize
Now includes the face count into the calculation which is 6 for cube maps and 1 for everything else
This commit is contained in:
parent
5ef1e585c6
commit
f0c50ce943
@ -85,7 +85,7 @@ Texture* IwiLoader::LoadIwi27(FileAPI::IFile* file)
|
||||
|
||||
for (int currentMipLevel = mipMapCount - 1; currentMipLevel >= 0; currentMipLevel--)
|
||||
{
|
||||
const size_t sizeOfMipLevel = texture->GetSizeOfMipLevel(currentMipLevel);
|
||||
const size_t sizeOfMipLevel = texture->GetSizeOfMipLevel(currentMipLevel) * texture->GetFaceCount();
|
||||
currentFileSize += sizeOfMipLevel;
|
||||
|
||||
if (currentMipLevel < static_cast<int>(_countof(iwi27::IwiHeader::fileSizeForPicmip))
|
||||
|
Loading…
x
Reference in New Issue
Block a user