Advertisement

Display List versus Vertex Array ??

Started by May 19, 2001 10:22 AM
14 comments, last by HalfLucifer 23 years, 9 months ago
Both have good resource-reusing strategies, and require predefined data and memory for run-time usage. However, display lists can define the geometry and state changes, while vertex array can only maintain the vertex data. Then, why not all using display lists instead of vertex array? I mean, are there some situation we should really use vertex array but not display lists? I''m really trying to figure it out.
Display lists are slower.
Advertisement
I''d also like to know the answer to this question.

Can anybody be a little more specific than "it''s slower/faster". How about explaining why it''s slower of faster, the advantages/disadvantages to vertex arrays vs display lists, etc.

I too would of thought that display lists are faster but apparently not...
I''m not real sure about the speed issues, but I think that vertex arrays can be manipulated and display lists must remain the same.

The speed difference is largely vendor specific I think.


Regards,
Krippy

Can you not use a vertex array within a display list?
I''m not sure but I don''t see any reason why you would want to.

A display list is data that is prerendered at the time you create the display list. You cannot modify the vertices or the lighting or textures after you create the display list. With a display list you do not have to calculate those things on the fly which saves some processing time if they are stationary objects that do not change at all.

I''m not real familiar with vertex arrays as they pertain to OpenGL yet, but if they are anything like vertex buffers in D3D, then they are not prerendered data. They are just collections of vertices, texture coordinates and maybe some alpha information.

You can manipulate the vertices, change the texture coordinates, color and lighting of a vertex buffer on the fly which is necessary for the cool effects that people want in games these days. I see some functions for setting pointers to processes with the vertex array extensions, so I think you might be able to create your own assembler routines to process the data that is held in the vertex array. This way you are not stuck with the default, maybe not the most efficient vertex shading capabilities for your project. At the same time you will be able to take advantage of the video cards speed and memory in processing the vertex arrays in other ways. The OpenGL was made more with precision in mind for graphics applications rather than speed for gaming. This allows you to replace the slow, precise calculations with rougher but faster calculations where necessary.

With display lists you are completely at the mercy of the standard OpenGL architecture I believe.

I may be wrong about the concept of vertex arrays in OpenGL though so somebody please correct me if I am mistaken

Regards,
Krippy
Advertisement
Can anyone quantify ''display lists are faster'' or ''display lists are slower''?

The reason I asked about vertex lists in a display list is that I''m reasonably sure it is more efficient to send vertex data in a vertex list than to just run through my own data structure setting vertices one at a time, and I might as well encapsulate state and lighting changes in the same display list in which the vertices are drawn. This would seem to work since, as best I can remember the OpenGL standard, display lists are guaranteed to not be slower than the code they encapsulate would be without the list, although they might not necessarily be faster.
My understanding from reading the OpenGL site (openGL.org) is that display lists are faster than vertex arrays. The main reason being that the display lists are static, so the driver/card can retain the information without passing data over the bus. Since you can alter the data in the Vertex Array even AFTER you call glDrawElement, the data must be copied each time it is used, which is slow.


Display lists are great for the classic 3D "object" that isn''t literally changing shape (vertices are locked) but may be scaled, rotated, translated, etc.

Vertex Arrays are great for objects that may change shape, but not connectivity (like deformable terrain perhaps, or rippling water).



Alrighty -- thanks everybody! This discussion has proved most useful...
Display lists are faster since a lot of the transform and lightning calculations ´can be skipped when using them.
The main benefit by using vertex arrays is that you save memory bandwidth. Send triangles one by one with GL_TRIANGLES is quite slow since you usually pass a lot of vertices multpile times etc. triangle lists are faster since some vertices can be skipped and thus saving badwidth and increasing performance. Vertex arrays are even more effective and are the prefered way to send a mesh if it isn''t static. Static meshes and objects could be passed as a display list.

Snale
+--My humble and superior homepage

This topic is closed to new replies.

Advertisement