ARB_fragment_shader state
authorMichal Krol <mjkrol@gmail.org>
Thu, 14 Apr 2005 10:28:14 +0000 (10:28 +0000)
committerMichal Krol <mjkrol@gmail.org>
Thu, 14 Apr 2005 10:28:14 +0000 (10:28 +0000)
src/mesa/main/hint.c

index 23ab1e6d0e6ce634ae219461363abd647ffe4bbb..6680edd165594b385171276d766ea03d2b999f4c 100644 (file)
@@ -109,6 +109,18 @@ _mesa_Hint( GLenum target, GLenum mode )
             return;
         FLUSH_VERTICES(ctx, _NEW_HINT);
         ctx->Hint.GenerateMipmap = mode;
+         break;\r
+\r
+      /* GL_ARB_fragment_shader */\r
+      case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:\r
+         if (!ctx->Extensions.ARB_fragment_shader) {\r
+            _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)");\r
+            return;\r
+         }\r
+         if (ctx->Hint.FragmentShaderDerivative == mode)\r
+            return;\r
+         FLUSH_VERTICES(ctx, _NEW_HINT);\r
+         ctx->Hint.FragmentShaderDerivative = mode;\r
          break;
 
       default:
@@ -136,5 +148,6 @@ void _mesa_init_hint( GLcontext * ctx )
    ctx->Hint.Fog = GL_DONT_CARE;
    ctx->Hint.ClipVolumeClipping = GL_DONT_CARE;
    ctx->Hint.TextureCompression = GL_DONT_CARE;
-   ctx->Hint.GenerateMipmap = GL_DONT_CARE;
+   ctx->Hint.GenerateMipmap = GL_DONT_CARE;\r
+   ctx->Hint.FragmentShaderDerivative = GL_DONT_CARE;
 }