summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_light.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl/t_vb_light.c')
-rw-r--r--src/mesa/tnl/t_vb_light.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 4d360007a46..47c5b400aae 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -135,7 +135,7 @@ prepare_materials(GLcontext *ctx,
* update_materials(), above, that'll actually copy the vertex color to
* the material attribute(s).
*/
- for (i = _TNL_ATTRIB_MAT_FRONT_AMBIENT ; i < _TNL_ATTRIB_INDEX ; i++) {
+ for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) {
if (VB->AttribPtr[i]->stride) {
const GLuint j = store->mat_count++;
const GLuint attr = i - _TNL_ATTRIB_MAT_FRONT_AMBIENT;
@@ -251,7 +251,7 @@ static GLboolean run_lighting( GLcontext *ctx,
VB->AttribPtr[_TNL_ATTRIB_COLOR0] = VB->ColorPtr[0];
VB->AttribPtr[_TNL_ATTRIB_COLOR1] = VB->SecondaryColorPtr[0];
- VB->AttribPtr[_TNL_ATTRIB_INDEX] = VB->IndexPtr[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = VB->IndexPtr[0];
return GL_TRUE;
}