I'm doing some OpenGL (2.1) tests, and while trying to make a simple cube I was wondering how to make complex meshes. For my cube I just set manualy each vertex with GL_TRIANGLES
. But I don't know how to make the same inside a loop for example. Because of the order of the vertices and because there are so many repeated vertices!
I really have to make a face by setting 3 vertex "once" (for both triangles)? That seems so slow. How to optimize?
What are the techniques to make/load meshes?
Oh, I would appreciate some example.