I'm starting with OpenGL
and at the moment, my Program draws a Cube with GL_TRIANGLES
(therefore, no code example; it's trivial and would only waste your time).
My Question is:
Is it possible to reuse vertices so I need only 8 instead of 12*3 (or 14 with GL_TRIANGLE_STRIP
) to draw a Cube?
And if it's possible, how can I set multiple colors for one vertex (I want to only reuse the position data, but each triangle should have different colors.)
I tried to find information online, but didn't find anything about reusing vertices for different triangles (only to reuse them by changing the position matrix).