Is it required that we should unbind a buffer object before deleting it? If I had bound it in a VAO and deleted it without unbinding (binding to 0), what will happen? Will the reference still exist?
public void dispose()
{
glBindVertexArray(0);
glDeleteVertexArrays(vaoID);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glDeleteBuffers(vboVertID);
glDeleteBuffers(vboColID);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDeleteBuffers(eboID);
}
Is it a good or a bad practice to unbind before deletion?