Is it possible to draw a whole cube using just a single GL_TRIANGLE_STRIP
?
Obviously it\'s just the cube combinatorics I\'m concerned about here, it might a
Yes, after a bit of experimenting I found the answer myself. Imagine the corners of your cube are colored alternatingly black and white. Draw a triangle edge along each face between the two black corners. That way, the diagonals form a tetrahedron inside the cube. For the [0,1]³ cube, a possible sequence of coordinates would be the following:
Vertex Triangle Face
------+-----------+-----
0 0 0
0 1 0
1 0 0 000 010 100 **0
1 1 0 100 010 110 **0
1 1 1 100 110 111 1**
0 1 0 111 110 010 *1*
0 1 1 111 010 011 *1*
0 0 1 011 010 001 0**
1 1 1 011 001 111 **1
1 0 1 111 001 101 **1
1 0 0 111 101 100 1**
0 0 1 100 101 001 *0*
0 0 0 100 001 000 *0*
0 1 0 000 001 010 0**