I’ve been playing with glDrawElements() I can specify an array of triangles/polygons to draw. It works just fine, but there’s no way to specify triangles as vertex index to be draw.
e.g if I have an array of vertex […] and my triangle vertex index is [0,1,2,6,7,8] how can I draw these two triangles using open gl?.
I can do the rendering myself making calls to glVertex3f but I feel there’s a big overhead doing it this way.
If there was a way I can pass the vertex index to open gl as an array it would be very useful.