I can’t figure out why one of two display lists is drawing slow. Whichever list is called second will draw at half the frame rate.
GLuint call_lists[10];
GLuint call_list = 0;
...
void renderScene(void) {
...
//if current_obj is 0 by default, then 1 will
//draw at half the frame rate and vice versa
glCallList(mesh_obj[current_obj]);
...
}
int main(int argc, char **argv)
{
...
mesh_obj[0] = glGenLists(1);
glNewList(mesh_obj[0], GL_COMPILE);
drawTerrain();
glEndList();
mesh_obj[1] = glGenLists(1);
glNewList(mesh_obj[1], GL_COMPILE);
drawTerrain();//same draw function for test
glEndList();
glutMainLoop();
...
return(0);
}