fix an attr/src mix-up when setting-up/binding vertex arrays
This fixes problems with incorrect material coefficients when glMaterial is called per-vertex.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user