what is a vertex array?

Started by
15 comments, last by Daivuk 20 years, 11 months ago
Ok guys, I have made engine, with octree, blablabla, model. I stored my models in display list. Put Lightning, and bla bla bla But.... what the hell is a vertex array????? I see several post on that in that forum, but never get stop on it. But now i''m asking myself, what you guys mean by "vertex array" ? Just a quick answer, dont what to read a entire tutorial about it. What is it, and what is his use. Thanks
Advertisement
Its something you should use if you want performance.
In immediate mode you send vertices vertex per vertex to the gfx hardware which can be quite slow. Well with a vertex array you basically store an array of vertices in memory(ram) and instead of sending them one by one you send the whole buffer at once to the card. This greatly improves performance.

You should also look into Vertex Buffer Objects (VBO). They are new but from what I can tell them work the same way as a vertex array, but instead of storing the array on ram you store the array on the graphic card memory.
But its the same thing that Display list?
With display list you dont have to draw vertex by vertex, you already done that and ogl compiled it in a display list.
So is it the same thing? But only with vertex?
no its not the same thing. With a display list you can do a sequence of ogl calls and store them in a list but a vertex array is just a buffer of vertices.

As far as I know you cant use vertex arrays in a display list, so using vertex arrays is still faster.
Vertex arrays are not necessarily faster than using display lists. If you really want to know about them i suggest checking out the red book, its free online although i don''t have the URL, i''m sure someone will post it for ya.
From my tests, vertex arrays are faster than display lists. And they take less memory as well.

Height Map Editor | Eternal Lands | Fast User Directory
Yes, but you can have only one display list active at a time IIRC, (Am I right? My engine can't really use this nifty OGL feature) so vertex arrays are best used to store the level data (assuming you're using the standard OpenGL primitives as your user level representation) and display lists I found useful in my engine when placing objects like pickups (ammo packs, weapons, keys, etc) as repeated calls can be (RAPIDLY) made to show a display list's contents.

[edited by - Al Gorithm on May 8, 2003 10:46:11 PM]
You can have as many display lists active at a time as you want. Of course, there are the memory limitations.

Height Map Editor | Eternal Lands | Fast User Directory
struct Vertex { ... };

Vertex vertexArray[SizeOfVertexArray];

that is a vertex array.. you can give that to opengl to let gl draw..

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Can you include things like color, texture & texture coordinates, normals, etc in a vertex array? Or are they just for position data?

This topic is closed to new replies.

Advertisement