summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2006-11-02 18:00:43 +0000
committerKeith Whitwell <[email protected]>2006-11-02 18:00:43 +0000
commit5a652f595716a82ebd79e33011f6082199c4b0d0 (patch)
tree763c8be5347eb85367f3fc52df025d3d4a6d49a1 /src
parent6d104cb932080c5c0d951fbc0ec6d30fb7ebef45 (diff)
Fill in missing input slots in the vertex-array + no-vertex-program
path.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index b3650e26978..481c4ee5469 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -81,7 +81,8 @@ static GLuint get_max_index( GLuint count, GLuint type,
*/
static void bind_array_obj( GLcontext *ctx )
{
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+ struct vbo_context *vbo = vbo_context(ctx);
+ struct vbo_exec_context *exec = &vbo->exec;
GLuint i;
/* TODO: Fix the ArrayObj struct to keep legacy arrays in an array
@@ -89,6 +90,7 @@ static void bind_array_obj( GLcontext *ctx )
* go away.
*/
exec->array.legacy_array[VERT_ATTRIB_POS] = &ctx->Array.ArrayObj->Vertex;
+ exec->array.legacy_array[VERT_ATTRIB_WEIGHT] = &vbo->legacy_currval[i];
exec->array.legacy_array[VERT_ATTRIB_NORMAL] = &ctx->Array.ArrayObj->Normal;
exec->array.legacy_array[VERT_ATTRIB_COLOR0] = &ctx->Array.ArrayObj->Color;
exec->array.legacy_array[VERT_ATTRIB_COLOR1] = &ctx->Array.ArrayObj->SecondaryColor;
@@ -133,6 +135,13 @@ static void recalculate_input_bindings( GLcontext *ctx )
for (i = 0; i < MAT_ATTRIB_MAX; i++) {
inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->mat_currval[i];
}
+
+ /* Could use just about anything, just to fill in the empty
+ * slots:
+ */
+ for (i = MAT_ATTRIB_MAX; i < VERT_ATTRIB_MAX; i++)
+ inputs[i] = &vbo->generic_currval[i - VERT_ATTRIB_GENERIC0];
+
break;
case VP_NV:
/* NV_vertex_program - attribute arrays alias and override