PDA

View Full Version : Display List with Vertex Array



Omaha
08-12-2002, 03:07 PM
If I draw from a vertex array using glDrawElements within a display list will performance be better than if I pass vertices directly with glVertex calls within the display list?

My thinking is, "not too much" since it will all end up being stored on the server anyway. This is static vertex information.

[This message has been edited by Omaha (edited 08-12-2002).]

Rob The Bloke
08-13-2002, 12:00 AM
No. Dont worry about it (and generally it is best not to use vertex arrays within display lists cos the behaviour is undefined)

harsman
08-13-2002, 03:09 AM
Using vertex arrays within a display list is certainly not undefined. However, the vertex data is deferenced at display list compilation so you lose a lot of the flexibility of vertex arrays. It might be slightly faster than immediate mode in a display list if you use indexed primitives (glDrawElements) when drawing the vertex array, but that probably depends on the driver.

Morglum
08-13-2002, 05:47 AM
I've benchmarked it : i got only +1% speed ofr a model that needed many state changes (even after some state sorting), so don't worry about that.

Omaha
08-13-2002, 12:53 PM
Thanks for confirming my suspicions. I did some geometry optimizing today, so that will help no matter what. I will go with immediate mode in the display list for simplicity's sake.

There isn't alot of state changing going on, just a significant number of static vertices and multiple textures.