View Full Version : Index arrays? How do they work?

12-19-2000, 11:10 PM
I'm not exactly new on OGL but very new on VertexArrays. I have a huge array with vertex data and another huge array with information, how to build triangles out of it. Now I build a new even more huge array with vertices for each triangle and draw this with glDrawArrays. This work correctly.
I thought, that IndexArrays are only for COLORindices but a few post in this forum made me think, they are for indexing the vertices in the specific arrays. So, here is my question: How do I have to build the arrays (vertex, normal, texture, INDEX) not to have to build the even more huge array with many dublicate vertices? In my current implementation I don't see any performance improvement over sending the data to OGL via glVertex3d etc. blahblah...

Any help would be greatly appreciated.

[This message has been edited by Marc (edited 12-20-2000).]

12-20-2000, 10:28 PM
Ok, ok, I figured it out, how to use glDrawElements, which does exactly what I want.