I'm trying to clear up some inconsistencies I'm seeing in triangle strip vertex winding direction (clockwise and counter-clockwise). I'm drawing a trapezoid rotated 90 degrees counter-clockwise in OpenGL. Here's the relevant code:
unsigned char mIndices[] = { 0, 1, 2, 3, 4, 5 };
signed short mVertices[] = {
-50, 100, 0, // A
-85, 65, 0, // B
-50, 65, 0, // C
-85, -65, 0, // D
-50, -65, 0, // E
-50, -100, 0, // F
};
...
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_SHORT, 0, mVertices);
...
glDrawElements(GL_TRIANGLE_STRIP, sizeof(mVertices)/sizeof(mVertices[0]), GL_UNSIGNED_BYTE, mIndices);
From what I read here, the default front face in OpenGL is counter-clockwise, which means the first triangle in my strip should have it's vertices ordered counter-clockwise. Additionally, when drawing a triangle strip, the winding switches directions between counter-clockwise and clockwise from triangle to triangle, so my vertices are ordered in that manner. So from my code, the first triangle would be ABC, the second would be BCD, third CDE, and fourth DEF. However, this article (in the quote from the OpenGL Programming Guide) says that it would draw them as ABC, CBD, CDE, EDF (assuming v0 - A, v1 - B, etc) which means they all wind the same counter-clockwise direction.
If I'm understanding the A/B notation correctly from the OpenGL specification, the triangles would all wind the same direction, but I've seen the varying winding in a few different places. I suppose it's just an issue of semantics since the resulting shape is the same, but what is the actual winding order?