Don't perform dangling attribute check on POS attribute. It can't by
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 20 Nov 2006 11:49:58 +0000 (11:49 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 20 Nov 2006 11:49:58 +0000 (11:49 +0000)
definition dangle (every vertex has a position).  However
save->currentsz isn't properly maintained for this attribute, as there
is no current position value to track.  Based on patch from Haihao Xiang.

src/mesa/vbo/vbo_save_api.c

index 8ceba2b832b6ad566b5d6a08f060fb4a5528fa47..efe018b09e2a7dae3653294be7bdb8060b287018 100644 (file)
@@ -527,7 +527,7 @@ static void _save_upgrade_vertex( GLcontext *ctx,
 
       /* Need to note this and fix up at runtime (or loopback):
        */
-      if (save->currentsz[attr][0] == 0) {
+      if (attr != VBO_ATTRIB_POS && save->currentsz[attr][0] == 0) {
         assert(oldsz == 0);
         save->dangling_attr_ref = GL_TRUE;
       }