re-fix bug 9062 in vbo code
authorRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 25 Jan 2007 11:11:03 +0000 (12:11 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Thu, 25 Jan 2007 11:11:03 +0000 (12:11 +0100)
src/mesa/vbo/vbo_exec_draw.c

index 846d5dc196cee4f59d2261c438907fda282405e8..2b52d7a1fff9662c4a64f0144eb81193642f116c 100644 (file)
@@ -114,6 +114,11 @@ static GLuint vbo_copy_vertices( struct vbo_exec_context *exec )
         return 2;
       }
    case GL_TRIANGLE_STRIP:
+      /* no parity issue, but need to make sure the tri is not drawn twice */
+      if (nr & 1) {
+        exec->vtx.prim[exec->vtx.prim_count-1].count--;
+      }
+      /* fallthrough */
    case GL_QUAD_STRIP:
       switch (nr) {
       case 0: ovf = 0; break;