Do not make handle not resident when deleting GLMesh
There is no way to delete an Handle except by deleting underlying texture so it's fine.
This commit is contained in:
parent
f3ec623093
commit
fee5858959
@ -32,15 +32,10 @@ void STKAnimatedMesh::cleanGLMeshes()
|
||||
continue;
|
||||
if (mesh.vao)
|
||||
glDeleteVertexArrays(1, &(mesh.vao));
|
||||
glDeleteBuffers(1, &(mesh.vertex_buffer));
|
||||
glDeleteBuffers(1, &(mesh.index_buffer));
|
||||
#ifdef Bindless_Texture_Support
|
||||
for (unsigned j = 0; j < 6; j++)
|
||||
{
|
||||
if (mesh.TextureHandles[j] && glIsTextureHandleResidentARB(mesh.TextureHandles[j]))
|
||||
glMakeTextureHandleNonResidentARB(mesh.TextureHandles[j]);
|
||||
}
|
||||
#endif
|
||||
if (mesh.vertex_buffer)
|
||||
glDeleteBuffers(1, &(mesh.vertex_buffer));
|
||||
if (mesh.index_buffer)
|
||||
glDeleteBuffers(1, &(mesh.index_buffer));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,13 +58,6 @@ void STKMeshSceneNode::cleanGLMeshes()
|
||||
glDeleteBuffers(1, &(mesh.vertex_buffer));
|
||||
if (mesh.index_buffer)
|
||||
glDeleteBuffers(1, &(mesh.index_buffer));
|
||||
#ifdef Bindless_Texture_Support
|
||||
for (unsigned j = 0; j < 6; j++)
|
||||
{
|
||||
if (mesh.TextureHandles[j] && glIsTextureHandleResidentARB(mesh.TextureHandles[j]))
|
||||
glMakeTextureHandleNonResidentARB(mesh.TextureHandles[j]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
GLmeshes.clear();
|
||||
for (unsigned i = 0; i < MAT_COUNT; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user