From a2e6beade196aef269bda6bb3efb68809f85a683 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 16 May 2008 15:23:04 -0600 Subject: 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. --- src/mesa/vbo/vbo_exec_draw.c | 2 +- src/mesa/vbo/vbo_save_draw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/vbo') 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); } } } -- cgit v1.2.3