mesa: added glEnable/Disable state for transform feedback
authorBrian Paul <brianp@vmware.com>
Wed, 31 Mar 2010 01:54:51 +0000 (19:54 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Mar 2010 02:04:04 +0000 (20:04 -0600)
src/mesa/main/enable.c

index f5c88a63e6e7e95c2318e7095b93cf1f5c8ca355..f9decc31ab75e3b3ffa36d4413e623ef38d64054 100644 (file)
@@ -982,6 +982,16 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
         ctx->Texture.CubeMapSeamless = state;
         break;
 
+#if FEATURE_EXT_transform_feedback
+      case GL_RASTERIZER_DISCARD:
+        CHECK_EXTENSION(EXT_transform_feedback, cap);
+         if (ctx->TransformFeedback.RasterDiscard != state) {
+            ctx->TransformFeedback.RasterDiscard = state;
+            FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+         }
+         break;
+#endif
+
       default:
          _mesa_error(ctx, GL_INVALID_ENUM,
                      "%s(0x%x)", state ? "glEnable" : "glDisable", cap);
@@ -1493,6 +1503,12 @@ _mesa_IsEnabled( GLenum cap )
         CHECK_EXTENSION(ARB_seamless_cube_map);
         return ctx->Texture.CubeMapSeamless;
 
+#if FEATURE_EXT_transform_feedback
+      case GL_RASTERIZER_DISCARD:
+        CHECK_EXTENSION(EXT_transform_feedback);
+         return ctx->TransformFeedback.RasterDiscard;
+#endif
+
       default:
          _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap);
         return GL_FALSE;