Sorry about this, I feel a little embaressed at having to ask this question.
In my very simple test environment, I’m rendering 8000 cubes (made out of GL_QUADS).
I’m running this on a dual PIII 700mhz with a geforce2 gts with nvidia drivers about 1.5 months old.
I’m getting 36fps without using a display lists, and 24fps using a display list. Both methods use immediate mode to send the vertices and normals.
Here’s the code (the Draw_Cube() function just issues 24 glVertex+glNormal calls)
:-
//#define USEDISPLAYLIST
#ifdef USEDISPLAYLIST
static unsigned int displist=0;if (!displist) { displist = glGenLists(1); glNewList(displist, GL_COMPILE); glBegin(GL_QUADS); for (float x=-(w*0.5f); x<(w*0.5f); x+=wstep) for (float y=-(h*0.5f); y<(h*0.5f); y+=hstep) for (float z=-(d*0.5f); z<(d*0.5f); z+=dstep) context.Draw_Cube(x, y, z, sizex); glEnd(); glEndList(); } else glCallList(displist);
#else
glBegin(GL_QUADS);
for (float x=-(w0.5f); x<(w0.5f); x+=wstep)
for (float y=-(h0.5f); y<(h0.5f); y+=hstep)
for (float z=-(d0.5f); z<(d0.5f); z+=dstep)
context.Draw_Cube(x, y, z, sizex);
glEnd();
#endif
Can anyone suggest why the display list is slower than the straight immediate mode?
[This message has been edited by knackered (edited 05-17-2002).]