summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-10-31 19:57:39 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-10-31 19:57:39 +0000
commitfab2936ea271d15767fae9a7e95920982c39c8b2 (patch)
tree636958a756b2b0b1ebdb44f620d984b63db1fbe6
parent510d86231d997ff9bbafb340b5b2d3ecf4c1f2ce (diff)
sync with DRI texgen and texture matrix bug fixes
-rw-r--r--src/mesa/main/state.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 1ac24cd4016..9b2754dfc60 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.21.4.3 2000/10/21 01:22:13 brianp Exp $ */
+/* $Id: state.c,v 1.21.4.4 2000/10/31 19:57:39 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -934,21 +934,23 @@ void gl_update_state( GLcontext *ctx )
ctx->Texture.Unit[1].LastEnvMode = ctx->Texture.Unit[1].EnvMode;
}
- if (ctx->NewState & NEW_TEXTURE_MATRIX) {
- ctx->Enabled &= ~(ENABLE_TEXMAT0|ENABLE_TEXMAT1);
+ /* Update ctx->Enabled's ENABLE_TEXMATn flags */
+ if (ctx->NewState & (NEW_TEXTURE_MATRIX | NEW_TEXTURE_ENABLE)) {
+ ctx->Enabled &= ~(ENABLE_TEXMAT0 | ENABLE_TEXMAT1);
for (i=0; i < MAX_TEXTURE_UNITS; i++) {
if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER) {
gl_matrix_analyze( &ctx->TextureMatrix[i] );
ctx->TextureMatrix[i].flags &= ~MAT_DIRTY_DEPENDENTS;
-
- if (ctx->Texture.Unit[i].Enabled &&
- ctx->TextureMatrix[i].type != MATRIX_IDENTITY)
- ctx->Enabled |= ENABLE_TEXMAT0 << i;
}
+ if (ctx->Texture.Unit[i].Enabled &&
+ ctx->TextureMatrix[i].type != MATRIX_IDENTITY) {
+ ctx->Enabled |= ENABLE_TEXMAT0 << i;
+ }
}
}
+ /* Update ctx->Enabled's ENABLE_TEXGENn and ENABLE_TEXn flags */
if (ctx->NewState & (NEW_TEXTURING | NEW_TEXTURE_ENABLE)) {
ctx->Texture.NeedNormals = GL_FALSE;
gl_update_dirty_texobjs(ctx);