summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2003-10-13 12:31:58 +0000
committerKeith Whitwell <[email protected]>2003-10-13 12:31:58 +0000
commit5b9ad341a0ecbb97ddd1e830d90cbc8a9234ca70 (patch)
tree69e95507c3c4e8ae548c85511f80e5e8ea7db240 /src
parentfcd68a2b3066d02678877963565aa43adddc8d72 (diff)
Correct initialization of tnl->vtx.current for material attributes.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/tnl/t_vtx_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c
index 4252358563d..578b812dda9 100644
--- a/src/mesa/tnl/t_vtx_api.c
+++ b/src/mesa/tnl/t_vtx_api.c
@@ -35,6 +35,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "macros.h"
#include "vtxfmt.h"
#include "dlist.h"
+#include "state.h"
#include "api_arrayelt.h"
#include "api_noop.h"
#include "t_vtx_api.h"
@@ -1074,8 +1075,9 @@ static void _tnl_current_init( GLcontext *ctx )
for (i = 0; i < VERT_ATTRIB_MAX; i++)
tnl->vtx.current[i] = ctx->Current.Attrib[i];
- for (i = _TNL_ATTRIB_MAT_FRONT_AMBIENT; i < _TNL_ATTRIB_INDEX; i++)
- tnl->vtx.current[i] = ctx->Light.Material.Attrib[i];
+ for (i = 0; i < MAT_ATTRIB_MAX; i++)
+ tnl->vtx.current[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] =
+ ctx->Light.Material.Attrib[i];
tnl->vtx.current[_TNL_ATTRIB_INDEX] = &ctx->Current.Index;