Hi,
I’m trying to compile a set of drawelements call in a display list. According to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glfunc01_1kz7.asp
It should be possible to include it in the display list. I don’t get any error at display list compilation or display list call with glGetError, and my drawelements code works perfectly out of my display list. However, nothing appears on the screen when the display list is called.
I’m using a radeon 9600, under win2k with catalyst 4.6.
Here is the code:
primitives = glGenLists( 1 );
glNewList( primitives, GL_COMPILE );
for (j=0; j<n_vertex-1; j++)
{
vstream->DrawElements( RDR_PRIMITIVE_TRIANGLE_STRIP, n_vertex*2, indices+(j*2*n_vertex) );
}
glEndList();
int error = glGetError(); // returns 0
vstream->BindBuffers();
#if 1
/* nothing appears on screen here */
glCallList( primitives );
int error = glGetError(); // returns 0
#else
/* works perfectly */
for (j=0; j<n_vertex-1; j++)
{
vstream->DrawElements( RDR_PRIMITIVE_TRIANGLE_STRIP, n_vertex*2, indices+(j*2*n_vertex) );
}
#endif
vstream->UnBindBuffers();