Display lists vs. Vertex Arrays?

Started by
32 comments, last by DalTXColtsFan 20 years, 3 months ago
To those who have used both, what are the pros and cons of each vs. the other? When would you clearly use one over the other? Thanks Love means nothing to a tennis player

My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)

Advertisement
They are used for different purposes. Generally, vertex arrays are faster, but OpenGL tends to be pretty good with Display list too. The big difference is the way the data is gathered. Vertex arrays are generally loaded from an outside file, while display list are hard-coded models.
quote:Vertex arrays are generally loaded from an outside file, while display list are hard-coded models.


I wouldn''t agree with that there.

I find for the most part vertex arrays are faster and have less limitations. I did notice display lists preform better when drawing the same object, many, many times.
True, use vertex arrays for dynamic data and display lists for static data.
I have a better anwser for both->Use Vertex Arrays in Display Lists
The performance at high poly-counts is almost double
->Also lesser objects, better performance, can`t seem to know why... probably the lesser function calls

Relative Games - My apps

quote:Original post by cippyboy
I have a better anwser for both->Use Vertex Arrays in Display Lists
The performance at high poly-counts is almost double
->Also lesser objects, better performance, can`t seem to know why... probably the lesser function calls


I second that, the performance in many cases has been similar to VBOs when you put a Vertex Array into a Display List.

quote:
They are used for different purposes. Generally, vertex arrays are faster, but OpenGL tends to be pretty good with Display list too. The big difference is the way the data is gathered. Vertex arrays are generally loaded from an outside file, while display list are hard-coded models.


None of this is true.
You can load data from files for use with Display Lists by using glBegin()/glEnd(). But a better way would be to use Vertex Arrays in Display Lists as mentioned above.

Also, the way i look at it is this

Static Objects = Vertex Arrays in Display Lists/VBOs
Dynamic Objects = Vertex Arrays Only



Regarding vertex arrays in display lists, would it be something like this?

CheckExtension(etc);glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(3, etc, etc);glNewList(i, GL_COMPILE);    glDrawElements(GL_TRIANGLE, 100, etc, etc);glEndList(); 


You simply toss in the vertex array calls into the display list? Also, clearly you can''t modify data in a display list, but are you allowed to modify the vertex array data? Do you modify data as necessary, lock arrays, draw, then unlock? I notice people saying that they use vertex arrays for dynamic data, so I''m wondering at which point in the program flow to modify the data. I don''t have a lot of experience using vertex arrays, so I''m unsure how to use them efficiently.

Thanks.
Ok, if i have understood this correctly, this is correct:

- begin the display list
- place the vbo function into memory using a pointer like pVERT
- end display list

- change the data in pVERT
- call the display list:
- calls the vbo function
- refers to the pointer in system memory

Is this correct?
quote:Original post by chawk
Regarding vertex arrays in display lists, would it be something like this?

CheckExtension(etc);glEnableClientState(GL_VERTEX_ARRAY);glVertexPointer(3, etc, etc);glNewList(i, GL_COMPILE);    glDrawElements(GL_TRIANGLE, 100, etc, etc);glEndList(); 


You simply toss in the vertex array calls into the display list? Also, clearly you can''t modify data in a display list, but are you allowed to modify the vertex array data? Do you modify data as necessary, lock arrays, draw, then unlock?

When you compile a display list from a vertex array, the vertex array is dereferenced at compile time, and the data is copied into the display list. Once the list is compiled, you can do whatever you want with the vertex array, it won''t affect the display list.
Hi,

If you go down to 16.100, putting vertex arrays in a display list may not necessarily give you an increase in performance but quite the opposite.

http://www.opengl.org/resources/faq/technical/displaylist.htm
The more applications I write, more I find out how less I know

This topic is closed to new replies.

Advertisement