mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 00:25:44 +00:00
ObjLoading: Fix not setting texture size on loading an image to signalize there's a valid texture object
This commit is contained in:
parent
80deff450d
commit
dd4987c2f1
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user