vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays
[mesa.git] / src / mesa / vbo / vbo_context.c
index b2e6bbc12fb7aa4ad0a7f0c3d1680148066f71b8..d83f2fd23a5088382853ee2025d4839e034a12cd 100644 (file)
@@ -176,17 +176,14 @@ GLboolean _vbo_CreateContext( struct gl_context *ctx )
    {
       GLuint i;
 
-      /* When no vertex program, pull in the material attributes in
-       * the generic range.
-       */
-      for (i = 0; i < VERT_ATTRIB_FF_MAX; i++) 
+      /* identity mapping */
+      for (i = 0; i < Elements(vbo->map_vp_none); i++) 
         vbo->map_vp_none[i] = i;
+      /* map material attribs to generic slots */
       for (i = 0; i < NR_MAT_ATTRIBS; i++) 
         vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)]
             = VBO_ATTRIB_MAT_FRONT_AMBIENT + i;
-      for (i = NR_MAT_ATTRIBS; i < VERT_ATTRIB_GENERIC_MAX; i++)
-        vbo->map_vp_none[VERT_ATTRIB_GENERIC(i)] = i;
-      
+
       for (i = 0; i < Elements(vbo->map_vp_arb); i++)
         vbo->map_vp_arb[i] = i;
    }