Question about display lists and performance

Is there a performance hit to compile and execute a display list, compared to just “standard rendering”?

I have seen the numbers regarding the speed of display lists compared to other performance enhancements, and I figured if I am going to do multipass rendering, maybe I could exploit display lists for things like terrain rendering, compile&execute on the first pass and then execute the display list on successive passes.

Display lists are designed to be cached over multiple frames, not merely a few passes.

If you can you should store your display list on the graphics card on the first frame and reuse this as much as you can on subsequent passes AND frames.

I don’t have a feel for how expensive the ‘compile’ is for passes, likely it will vary. It is potentially a lot faster to do display lists over multiple frames but probably slower if you’re only using this for passes in one frame.

These days however there are other options like VBOs that may suit your purposes better because they have the potential to render extremely quickly by storing data either in GART memory or on the card and providing mechanisms to update that data while retaining optimal performance either through DMA to the card or caching on the card.

[This message has been edited by dorbie (edited 02-22-2004).]

If you just want to multi-pass a single vertex buffer for a single frame, and can’t use ARB_vertex_buffer_object, then LockArraysEXT() is probably what you want. It’s well optimized by vendors (at least for some vertex formats), because the Quake series uses it. The only draw-back is that you can only have one set of arrays locked at a time, and many drivers don’t optimize if you lock more than about 1200 vertices at a time.

Ok thanx. Display lists have worked sweetly where I have used them for shadows and rendering just about every other type of geometry… I was wondering how fast they were on the compile.

When I went to SIGGRAPH last year, I saw a presentation about OpenGL performance. It is incredible what has been done in the way of squeezing every bit of performance out of display lists. Vertex array and other such buffers are a modest increase in speed compared, but surprisingly on one card actually took a HIT on performance.
I never thought to ask how well they compiled display lists.