OGL 1.1 question: vertex array vs. display list

Hi all,

I know this is not related to JOGL but here is my question. I’m developing with a video card that supports only OGL 1.1 so I guess that for 2D rendering the optimizations available to me are vertex arrays and display lists (and maybe some still unknown extensions?). My question is which of these options is the most performing? My understanding is that both can be used to cache on the client vertex operations. When I read the OGL doc I really don’t know what is the difference between the two in terms of functionnality.

Thanks for your help!

EDIT: I just realized that I posted in joal instead of jogl. Sorry for that simply clicked the wrong link. Can a moderator move the topic please?

Display lists are a way to record a set of openGL operations for future use. Everything you do when defining the display list is stored on the video card (and possibly optimised).
Vertex arrays a simply a way to batch up a load of data and send it to the video card in one go, rather than with multiple calls to glVertex, glTexCoord, etc. The data is not stored on the video card in this case (That’s what VBOs do).

OK thanks bleb. I guess that for the same operations display lists execute much faster that vertex arrays. When you say video card, do you mean the framebuffer?

Yeah, using a display list to draw some geometry will be faster than a vertex array, but the drawback is that the display list cannot be altered without completely redefining it, wheras you can put different data into the vertx array with no penalty.
Thus, use display lists for stuff that is not likely to change. There’s also a certain number of opengl calls below which using a display list to batch them up is counter-productive, but I forget what it is. Be on the safe side and pack as much stuff in there as possible.

[quote]When you say video card, do you mean the framebuffer?
[/quote]
No, I mean the actual video hardware. Display lists are stored in VRAM, so they can be executed directly without any transfer from main memory to the video hardware. Vertex arrays reside in main memory, and so must be transfered to the video card every frame.

ok thanks again.