summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-05-16 15:23:04 -0600
committerBrian Paul <[email protected]>2008-05-16 15:23:04 -0600
commita2e6beade196aef269bda6bb3efb68809f85a683 (patch)
tree2868eb0f982114d4fbe56573abae71bf5dd13445 /src/mesa/vbo
parentf27c6f313955b737888ce80752ee9cd895562d40 (diff)
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.
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c2
-rw-r--r--src/mesa/vbo/vbo_save_draw.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 0ef26cdfe36..68ce7ba837d 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -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);
}
}
}
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index ee6df226054..bf5c6d4eefe 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -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);
}
}
}