diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-05-25 14:19:18 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-05-25 14:19:18 +1000 |
commit | 92120851947ad4a47d2150a7cf3f8dc5fdde396c (patch) | |
tree | 21a04cf25570028ee0266558a1350577751722ab /src/mesa/vbo/vbo_save_draw.c | |
parent | 9a01ee4424718e0c3015c1f0477cae63ee63d96b (diff) | |
parent | 7fbb61eedd4b07f07007a172cea227d5c363b908 (diff) |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/vbo/vbo_save_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_save_draw.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c index 3c6f0fccd9..bf5c6d4eef 100644 --- a/src/mesa/vbo/vbo_save_draw.c +++ b/src/mesa/vbo/vbo_save_draw.c @@ -131,10 +131,12 @@ static void vbo_bind_vertex_list( GLcontext *ctx, break; } - for (attr = 0; attr < VBO_ATTRIB_MAX; attr++) { - if (node->attrsz[attr]) { + for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) { + GLuint src = map[attr]; + + if (node->attrsz[src]) { arrays[attr].Ptr = (const GLubyte *)data; - arrays[attr].Size = node->attrsz[attr]; + arrays[attr].Size = node->attrsz[src]; arrays[attr].StrideB = node->vertex_size * sizeof(GLfloat); arrays[attr].Stride = node->vertex_size * sizeof(GLfloat); arrays[attr].Type = GL_FLOAT; @@ -144,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); } } } |