diff --git a/model.cpp b/model.cpp index 8d5f46a..0684ba1 100755 --- a/model.cpp +++ b/model.cpp @@ -28,18 +28,7 @@ namespace vb01{ } Model::~Model(){ - vector descendants; - getDescendants(descendants); - - for(Node *node : descendants) - for(Mesh *mesh : node->getMeshes()) - mesh->setMaterial(nullptr); - - while(!children.empty()){ - Node *c = children[children.size() - 1]; - dettachChild(c); - delete c; - } + this->setMaterial(nullptr); } void Model::update(){