Hi!
I'm working with VBOs and I suddenly sumbled across a very weird error. My compiler is giving me a run-time error saying that this statement can't be executed:
if ( glIsBuffer( VertexBuffer ) )
This statement can be found in this destructor:
VBOQuad::~VBOQuad()
{
//Clear vertex buffer
if ( glIsBuffer( VertexBuffer ) )
glDeleteBuffers( 1, &VertexBuffer );
//Clear index buffer
if ( glIsBuffer( IndexBuffer ) )
glDeleteBuffers( 1, &IndexBuffer );
VertexBuffer = NULL;
IndexBuffer = NULL;
}
I've tried to track this error down to find some sort of context, but I've found that the run-time error emerges before the first line of the main function is executed. The description of glIsBuffer says that the function will return true if the argument is the name of an existing buffer, and it will return false if the argument is zero or a non-zero value. The debugger says: