using only the neeeded number of vertex positions

This commit is contained in:
devZoGok
2024-08-19 18:23:09 +03:00
parent 6ce16b0837
commit 19990e48f4
8 changed files with 145 additions and 72 deletions
+3 -3
View File
@@ -28,14 +28,14 @@ namespace vb01{
}
Model::~Model(){
delete children[0]->getMesh(0)->getMaterial();
vector<Node*> descendants;
getDescendants(descendants);
for(Node *node : descendants)
for(Mesh *mesh : node->getMeshes())
for(Mesh *mesh : node->getMeshes()){
delete mesh->getMaterial();
mesh->setMaterial(nullptr);
}
while(!children.empty()){
Node *c = children[children.size() - 1];