Skip to content

Commit f5f539b

Browse files
committed
Fix LimonModel fails to load embedded textures
1 parent 7f68937 commit f5f539b

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/Assets/ModelAsset.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ void ModelAsset::loadGPUPart() {
162162
temporaryEmbeddedTextures.reset();
163163

164164
for (auto material = materialMap.begin(); material != materialMap.end(); ++material) {
165+
material->second->afterLoad(assetManager);//Since this depends on the embedded textures, needs to be done as part of GPU load
165166
material->second->loadGPUSide(assetManager);
166167
assetManager->getGraphicsWrapper()->setMaterial(*material->second);
167168
}

src/Assets/ModelAsset.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ class ModelAsset : public Asset {
253253
if (meshMaterialToUpdateIt != meshMaterialMap.end()) {
254254
meshMaterialMap[meshMaterialToUpdateIt->first] = materialPair.second;
255255
}
256-
materialPair.second->afterLoad(assetManager);
257256
}
258257
buildPhysicsMeshes();
259258
}

0 commit comments

Comments
 (0)