rename numInstances to initialInstances in loadGltf methods.

when initialInstances > 0, don't wait for createInstance to be called to create corresponding GltfSceneAsset
This commit is contained in:
Nick Fisher
2025-06-26 09:20:37 +08:00
parent b983c6bb90
commit ccc0a53abc
9 changed files with 49 additions and 46 deletions

View File

@@ -33,15 +33,16 @@ namespace thermion
Engine *engine,
utils::NameComponentManager* ncm,
MaterialInstance **materialInstances,
size_t materialInstanceCount,
int instanceIndex) : _asset(asset),
size_t materialInstanceCount) : _asset(asset),
_assetLoader(assetLoader),
_engine(engine),
_ncm(ncm),
_materialInstances(materialInstances),
_materialInstanceCount(materialInstanceCount)
{
createInstance();
for(int i = 0; i < asset->getAssetInstanceCount(); i++) {
createInstance();
}
TRACE("Created GltfSceneAsset from FilamentAsset %d with %d reserved instances", asset, asset->getAssetInstanceCount());
}