diff --git a/model.cpp b/model.cpp index 287c842..694ebc1 100755 --- a/model.cpp +++ b/model.cpp @@ -23,6 +23,12 @@ namespace vb01{ Model::Model(string path) : Node(){ ModelAsset *asset = ((ModelAsset*)AssetManager::getSingleton()->getAsset(path)); Node *clonedRoot = asset->rootNode->clone(); + vector descendants = vector{clonedRoot}; + clonedRoot->getDescendants(descendants); + + for(Node *desc : descendants) + for(Mesh *mesh : desc->getMeshes()) + mesh->construct(); for(Node *child : clonedRoot->getChildren()) attachChild(child);