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:
1 parent
b983c6bb90
commit
ccc0a53abc
9 files changed
+49
-46
No files matched your search
@@ -33,8 +33,7 @@ namespace thermion
|
||||
Engine *engine,
|
||||
utils::NameComponentManager* ncm,
|
||||
MaterialInstance **materialInstances = nullptr,
|
||||
size_t materialInstanceCount = 0,
|
||||
int instanceIndex = 0);
|
||||
size_t materialInstanceCount = 0);
|
||||
|
||||
~GltfSceneAsset();
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user