Display lists vs Vertex arrays

I’m sure this question has been asked somewhere before, but I can’t seem to get a good answer:

When would you prefer display lists over vertex arrays and vice-versa? What I’ve understood - and this makes sense - is that you’d use vertex arrays when you are dealing with dynamic data, and display lists when you’re dealing with a set of static data.

My next question: Given that, does it make sense to try to display animations (for example, of character models) using vertex arrays or display lists? It seems to me that you’d use vertex arrays, because the actual data that you’re sending to the card varies each and every frame. Has anybody actually used display lists for animation?

God bless,
-Toby

I have to say that my first experimentations with display lists has not yielded very good perforamance. vertex arrays are quite fast even though it is brining the geometry over every frame.

The real deal will be the vertex_buffer_object

http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_buffer_object.txt

I was just about to post that. :wink:

Unfortunately, you can’t use ARB_vertex_buffer_object with Jogl yet.

I know… hope they get it in soon.

To answer your second question, display lists are built on static objects. So, if you are animating an object in a display list, the display list would have to be generated again for each frame of animation. So you would never use display lists for animation.

Secondly, I too have been seeing poor performance using display lists in LWJGL. I don’t know what the cause is.

Display lists are just broken in some drivers, and not optimised in others. OpenGL only mandates that something works, not that it’s particularly fast, and sometimes they don’t manage either of those targets!

Because we’re the great unwashed with our cheapass video cards and only play games on them, display lists are a low priority on the optimisation front. Nvidia are the only company to have really done display lists properly on consumer cards in the past, and they may be simply downgrading their performance now because it makes more sense to optimise VBO transfer instead - precisely because nearly all game geometry sent to the card changes every frame.

Display lists have a useful feature that allows you to embed server state changes in them. Unfortunately this is what’s broken in some drivers, making them useless :frowning:

Cas :slight_smile: