From 92f9785c727ea10ff5f8dc9770f0e8f388fcea70 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 1 May 2003 22:44:02 +0000 Subject: Use ctx->Const.MaxTextureImageUnits and MaxTextureCoordUnits in more places. Misc vertex array / vertex program changes. --- src/mesa/main/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/state.c') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index f14c3f9d53..8030c9e94b 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -867,7 +867,7 @@ update_texture_matrices( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0; - for (i=0; i < ctx->Const.MaxTextureUnits; i++) { + for (i=0; i < ctx->Const.MaxTextureCoordUnits; i++) { if (ctx->TextureMatrixStack[i].Top->flags & MAT_DIRTY) { _math_matrix_analyse( ctx->TextureMatrixStack[i].Top ); @@ -903,6 +903,8 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._TexGenEnabled = 0; /* Update texture unit state. + * XXX this loop should probably be broken into separate loops for + * texture coord units and texture image units. */ for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; -- cgit v1.2.3