don't allow fog when using a fragment shader (bug 9346)
authorBrian <brian@yutani.localnet.net>
Sat, 16 Dec 2006 18:07:00 +0000 (11:07 -0700)
committerBrian <brian@yutani.localnet.net>
Sat, 16 Dec 2006 18:07:00 +0000 (11:07 -0700)
src/mesa/swrast/s_context.c

index 52d560ffdb66b3b5e6f25ce6429c53e146b24917..d4b8080ddc962021538b5fb278f8df751fc69bb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
+ * Version:  6.5.3
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
@@ -201,7 +201,10 @@ _swrast_update_fog_state( GLcontext *ctx )
 
    /* determine if fog is needed, and if so, which fog mode */
    swrast->_FogEnabled = GL_FALSE;
-   if (ctx->FragmentProgram._Enabled) {
+   if (ctx->ShaderObjects._FragmentShaderPresent) {
+      swrast->_FogEnabled = GL_FALSE;
+   }
+   else if (ctx->FragmentProgram._Enabled) {
       if (ctx->FragmentProgram._Current->Base.Target==GL_FRAGMENT_PROGRAM_ARB) {
          const struct gl_fragment_program *fp
             = ctx->FragmentProgram._Current;