What is the advantage of using vertex arrays…I know it is speed but
“why” is it faster? Right now i am rendering a terrain map. I divide it
up into quad trees and render the nodes that are in the view frustrum. I
dont have much experience with vertex arrays….so I have a question.
Would I have to have a index array for each node or something? What if
there card doesnt support it? I would have to be able to render it with
both methods. Main question…would it be worth it to go back and change
it to use vertex arrays?
Please log in or register to post a reply.
Generally speaking, vertex arrays are faster because you have less
function-call overhead than when calling glVertex3f() many times. With
vertex arrays, you just call one function, but with glVertex3f() you
call it many times (the number of verticies you have). Index arrays
basically lets you share verticies rather than having vertex repitition.
However, vertex arrays or index arrays have nothing to do with hardware
support. OpenGL supports them no matter what hardware you use. They are
simpily an area in memory where the vertex data is contained.
Another related thing to vertex arrays is vertex buffers(commonly
used in DirectX). These are the fastest you can get. But hardware must
support it. So it can’t be used if your card doesn’t support it. The
main difference between vertex arrays and vertex buffers is that vertex
buffers reside in AGP memory rather than main memory (RAM), which makes
rendering much faster. OpenGL provides vertex buffers through an
If you are concerned about hardware support, than you use vertex arrays
or support both.