ObjLoading: Fix not setting texture size on loading an image to signalize there's a valid texture object

This commit is contained in:
Jan 2020-02-11 20:45:57 +01:00
parent 80deff450d
commit dd4987c2f1

View File

@ -197,6 +197,11 @@ void ObjLoaderT6::LoadImageFromIwi(T6::GfxImage* image, ISearchPath* searchPath,
if(loadedTexture != nullptr) if(loadedTexture != nullptr)
{ {
image->texture.texture = loadedTexture; image->texture.texture = loadedTexture;
image->loadedSize = 0;
const int textureMipCount = loadedTexture->GetMipMapCount();
for(int mipLevel = 0; mipLevel < textureMipCount; mipLevel++)
image->loadedSize += loadedTexture->GetSizeOfMipLevel(mipLevel);
} }
else else
{ {