PDA

View Full Version : Display lists/Vertex arrays



04-27-2002, 02:11 AM
Hi

I've been reading the NVIDIA OpenGL performance FAQ and have a question on the importance of vertex arrays.

If my polygons are organized as tri/quad strips and I use display lists will it matter if I use vertex arrays to supply my vertices or not within the list. More precise, will the below lists be equally fast when rendered?

glNewList(..)

glBegin(...STRIP)
glVertex3v(..)
glVertex3v(..)

for(...)
glVertex3v(..)

glEnd()

glEndList(..)


glNewList(..)

glVertexPointer(...)
glDrawElements(...STRIP,...)

glEndList(..)


Thanx

/Peter

Bob
04-27-2002, 07:53 AM
You cannot use vertex arrays directly in your display list. And by directly, I mean that the display list won't use the vertex array itself when calling the list. You can compile a list with vertex arrays, but the vertices will be dereferenced from the vertex array, and "moved" into the display list instead. This means the array is only used when compiling the list.

How this affects performance, I don't know. The only way to get a correct answer is to measure the speed yourself. But I doubt there's any difference.

04-27-2002, 10:52 AM
Thanx, that was my idea too.

/Peter