fix an attr/src mix-up when setting-up/binding vertex arrays
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 16 May 2008 21:23:04 +0000 (15:23 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 16 May 2008 21:23:04 +0000 (15:23 -0600)
This fixes problems with incorrect material coefficients when glMaterial
is called per-vertex.

src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save_draw.c

index 0ef26cdfe3676fad824faf4ca997e10188c086b0..68ce7ba837ddd18d4a67c5956fd84d9e86345e16 100644 (file)
@@ -187,7 +187,7 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
         arrays[attr].BufferObj = exec->vtx.bufferobj; /* NullBufferObj */
         arrays[attr]._MaxElement = count; /* ??? */
 
-        data += exec->vtx.attrsz[attr] * sizeof(GLfloat);
+        data += exec->vtx.attrsz[src] * sizeof(GLfloat);
       }
    }
 }
index ee6df226054a0247f424e0ea3856d2931c084b25..bf5c6d4eefe98e06d5ac61922f1dd58cc7a3159e 100644 (file)
@@ -146,7 +146,7 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
         
         assert(arrays[attr].BufferObj->Name);
 
-        data += node->attrsz[attr] * sizeof(GLfloat);
+        data += node->attrsz[src] * sizeof(GLfloat);
       }
    }
 }