feat: use existing material instances when creating an instance of GeometrySceneAsset and no material instance is passed
This commit is contained in:
@@ -63,6 +63,11 @@ namespace thermion
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(materialInstanceCount == 0) {
|
||||||
|
materialInstanceCount = _materialInstanceCount;
|
||||||
|
materialInstances = _materialInstances;
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<GeometrySceneAsset> instance = std::make_unique<GeometrySceneAsset>(
|
std::unique_ptr<GeometrySceneAsset> instance = std::make_unique<GeometrySceneAsset>(
|
||||||
_engine,
|
_engine,
|
||||||
_vertexBuffer,
|
_vertexBuffer,
|
||||||
|
|||||||
Reference in New Issue
Block a user