decrease the current vertex count by 1 if an uneven number of vertices is copied...
authorRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 22 Nov 2006 22:07:35 +0000 (22:07 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 22 Nov 2006 22:07:35 +0000 (22:07 +0000)
src/mesa/tnl/t_vtx_exec.c

index 57d842f05fea54020f8408666736c29ef55aeca1..900c4ab6cc15effcd0ce6c50b1da2af617652b71 100644 (file)
@@ -239,6 +239,11 @@ static GLuint _tnl_copy_vertices( GLcontext *ctx )
         return 2;
       }
    case GL_TRIANGLE_STRIP:
+      /* no parity issue, but need to make sure the tri is not drawn twice */
+      if (nr & 1) {
+        tnl->vtx.prim[tnl->vtx.prim_count-1].count--;
+      }
+      /* fallthrough */
    case GL_QUAD_STRIP:
       switch (nr) {
       case 0: ovf = 0; break;