Support - Forum aa

« Back to Support
General Discussion » Understanding indexVector

» Understanding indexVector

Posted on 01.05.2012 by Marsh, Pat
I was wondering if you guys could give me a bit more explanation of exactly how indexVectors for surfaces work.. I know its an array referencing index buffers but i'm not exactly sure how they work. If you need an example of what i'm trying to do let me know but i'm hoping to understand how the values of the array affect the drawing of the surface... 

Thanks again and as always - awesome job with the engine!!!
|
Share this
 
Reply By Nehmad, Ariel 01.09.2012
hi pat, as you said, yes, they are just indices referencing to the vertices buffer.
and you should have three indices for each triangle.

each index corresponds to vertexVector[ index * sizePerVertex ]

where sizePerVertex is the amount of data for each vertice..for example....3 values for vertex position, 3 for normals, and 2 for uv's = 8 in most of the cases;

so, you'll have 8 values for each vertex.