summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 15:23:04 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-05-16 15:23:04 -0600
commita2e6beade196aef269bda6bb3efb68809f85a683 (patch)
tree2868eb0f982114d4fbe56573abae71bf5dd13445 /src
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')
-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 0ef26cdfe3..68ce7ba837 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 ee6df22605..bf5c6d4eef 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);
}
}
}