Opengl and Vertex Buffers,

Started by
6 comments, last by Azrael 20 years, 9 months ago
Cool! a opengl forum, now this si what I needed thanks gamedev! How can I use vertex buffers in open gl? I know how to use display lists but not vertex buffers. I went to nvidia, but I didnt find it (maybe I wasnt looking where I should) are vertex buffers the faster rendering system in open gl
Advertisement
Vertex buffers is called vertex arrays in OpenGL.
Yes, the fastest for GeForce cards are VAR/fence nvidia specific extensions to vertex arrays.
not always even on a geforce display lists can beat VAR/fence u will have to test yourself and see what works best

http://members.xoom.com/myBollux
Thanks guys, that really helped. But I was wondering is there a way to destroy and create again the display lists? I know the commands to build one but not to destroy it, and im not sure if it would be ok to do it.

I want to create a terrain system that loads patches of terrain, you visibly can see up to 4 at a time. but destroy those that re not necesary and then load up a new display for the next patch. Like a tile system applied to terrain blocks.
From the red book that you can download here from gamedev:
You can explicitly delete a specific display list or a contiguous range of lists with glDeleteLists(). Using
glDeleteLists() makes those indices available again.
void glDeleteLists(GLuint list, GLsizei range);
Deletes range display lists, starting at the index specified by list. An attempt to delete a list that
has never been created is ignored.
If you are deleting and recreating display lists on a regular basis, don''t do it. Consider vertex arrays instead in those cases.

Generally, display lists are extremely optimized in the graphics card drivers and can beat vertex arrays in many cases - but not always. So, while DL''s might beat VA''s for certain objects on your machine, the reverse might be true on another. As a general rule of thumb, use display lists for static objects and indexed vertex arrays for dynamic objects. Take advantage of extensions where available.
hey guys, who told u that vertex buffers is the same that vertex arrays?? they are not the same thing. vertex buffers is better than vertex arrays because they send vertices faster thatn vertex arrays, and in order to use them you have to use opengl extensions.
Thank you for sharing your (technically incorrect) opinion, AP, by necroing this 2 year old, totally outdated thread...

*sigh*

CLOSED.

This topic is closed to new replies.

Advertisement