summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-27 09:51:52 -0600
committerBrian <[email protected]>2007-03-27 09:51:52 -0600
commit3e45db67294faaf0a06c42bdd6dbdb96f87c8801 (patch)
treeb8dc873e8449e4f53e0acab6d410f8ad0b60e68c /src/mesa/main/state.c
parent3b8ab881312f36a948913653ed3c471017f811f0 (diff)
Restore the UseTexEnvProgram logic.
Was removed during glsl-compiler work. Still need to go back and revisit this because of the interaction with fragment shaders...
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 6ed7ae6c7dd..9ae71c57383 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -964,6 +964,9 @@ update_program(GLcontext *ctx)
if (shProg && shProg->LinkStatus) {
/* Use shader programs */
+ /* XXX this isn't quite right, since we may have either a vertex
+ * _or_ fragment shader (not always both).
+ */
ctx->VertexProgram._Current = shProg->VertexProgram;
ctx->FragmentProgram._Current = shProg->FragmentProgram;
}
@@ -1000,6 +1003,13 @@ update_program(GLcontext *ctx)
ctx->FragmentProgram._Current = NULL;
}
}
+
+ ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled;
+ if (ctx->FragmentProgram._MaintainTexEnvProgram &&
+ !ctx->FragmentProgram._Enabled) {
+ if (ctx->FragmentProgram._UseTexEnvProgram)
+ ctx->FragmentProgram._Active = GL_TRUE;
+ }
}