fixed bug when deallocating memory from models with multiple children

This commit is contained in:
devZoGok
2021-10-19 19:06:40 +03:00
parent c84b5d77b9
commit 3fd06f4932
8 changed files with 161 additions and 161 deletions
+3 -2
View File
@@ -30,7 +30,8 @@ namespace vb01{
for(Mesh *m : meshes)
delete m;
delete material;
if(material)
delete material;
glDeleteVertexArrays(1,&VAO);
glDeleteBuffers(1,&EBO);
@@ -163,7 +164,7 @@ namespace vb01{
if(reflect){
shader->setBool(reflect,"environmentMapEnabled");
root->getSkybox()->getMaterial()->getDiffuseMap(0)->select(4);
//environmentMap->select(4);
environmentMap->select(4);
}
if(skeleton){
}