Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DalTXColtsFan

Display lists vs. Vertex Arrays?

This topic is 5417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!