I am trying to send a pair of triangle strips, derived from input triangles, for rendering
The strips are defined by the following vertex indices:
strip 1: 0 14 16 15 1 23 30 41 8
strip 2: 31 7 17 18 16 0
14______15______23______41 7 ______18______0 / \ / \ / \ / \ / \ / \ / / \ / \ / \ / \ / \ / \ / 0-----16------1 ------30------8 31------17------16
These strips are derived from the following triangles of indices (that in turn come from an arbitrary mesh). I use a positive sign to indicate that the triangle has the same winding in the strip compared to the input triangle.
Strip 1 input triangles
0 14 16 +
14 15 16 -
1 16 15 +
1 15 23 -
1 23 30 +
41 30 23 -
8 30 41 +
Strip 2 input triangles
7 17 31 +
7 18 17 -
16 17 18 +
0 16 18 -
If these triangles are rendered as triangles I get the expected results - a pair of triangle strips with the visible faces of the triangles all on the same side (in this case the visible faces are pointing toward the viewer).
If I render the strips individually as triangle strips, I get the expect results - identical to the result obtained by drawing triangles.
However, if I concatenate these strips following the apple guidelines (by duplicating the last vertex of the first strip and the first vertex of the second strip), the strips are drawn with strip 1 correct and strip 2 flipped (i.e. visible side reversed).
14______15______23______41 7 ______18______0 / \ / \ / \ / \ / \ / \ / / \ / \ / \ / \ / \ / \ / 0-----16------1 ------30------8----8----31----31------17------16
Strip sequence passed to renderer: 0 14 16 15 1 23 30 41 8 8 31 31 7 17 18 16 0
Finally the trivial experiment of reversing the second strip and passing the new sequence strip to the renderer makes no difference - the second strip is still flipped.
What have I missed?