PDA

View Full Version : diplay lists vs. vertex arrays (again)



Hude
03-22-2000, 11:35 PM
From NVidia OpenGL performance FAQ:

From fastest to slowest:

Display lists
Can encapsulate data in the most efficient manner for hardware, though they are immutable (i.e. once created, you can't alter them in any way)

DrawElements/DrawArrays Using wglAllocateMemoryNV(size,0,0,1)
Saves data in video memory, eliminating any bus bottleneck. Very poor read/write access.

DrawElements/DrawArrays Using wglAllocateMemoryNV(size,0,0,.5)
Saves data in AGP (uncached) memory, and allows hardware to pull it directly. Very poor read access, must write sequentially.

DrawElements using Compiled Vertex Arrays (glLockArraysEXT)
Copies locked vertices to AGP memory, so that the hardware can pull it directly. Only certain modes are supported. (t2f/t2f/c4ub/v3f)

Immediate Mode
Multiple function calls required per primitive results in relatively poor performance compared to other options above.

All Other Vertex Arrays
Must be copied from application memory to AGP memory before the hardware can pull it. Since data can change between data calls, data must be copied every time, which is expensive.


My conclusion:
I was pretty surprised to hear that all the other vertex arrays are even slower than immediate mode, but it really makes sense. For static objects use display lists. For dynamic objects check for extensions and try to use them, otherwise use immediate mode.

Thoughts?

[This message has been edited by Hude (edited 03-23-2000).]

Eric
03-23-2000, 10:26 PM
Well not a thought but I changed one of my programs which was using doubles with GL_compiled_vertex_array so that it now uses floats and the boost is quite impressive !
I had seen this on the nVidia site but did not have time to try !

Thanks for reminding me !

Eric

Hude
03-24-2000, 03:04 AM
Originally posted by Eric:
Well not a thought but I changed one of my programs which was using doubles with GL_compiled_vertex_array so that it now uses floats and the boost is quite impressive !

Yeah, that's pretty sensible as the amount of data is 50% of the original.