Merge pull request #80 from devZoGok/imp-107-pf

Imp 107 pf
This commit is contained in:
devZoGok
2024-11-30 13:00:52 +00:00
committed by GitHub
2 changed files with 4 additions and 13 deletions
+1 -12
View File
@@ -28,18 +28,7 @@ namespace vb01{
}
Model::~Model(){
vector<Node*> 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(){
+3 -1
View File
@@ -32,8 +32,10 @@ namespace vb01{
for(Mesh *m : meshes)
delete m;
for(Light *l : lights)
for(Light *l : lights){
removeLight(l);
delete l;
}
for(ParticleEmitter *p : emitters)
delete p;