mesa: glGet queries for GL_EXT_provoking_vertex
authorBrian Paul <brianp@vmware.com>
Thu, 28 May 2009 18:31:56 +0000 (12:31 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 28 May 2009 18:31:56 +0000 (12:31 -0600)
src/mesa/main/get.c
src/mesa/main/get_gen.py

index 1ed6fc33832cb4a8925c58f0a2953d0e798519d5..516159bbf2fe6eb151cb9f3f1b39af8992150949 100644 (file)
@@ -1835,6 +1835,14 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
          CHECK_EXT1(EXT_framebuffer_blit, "GetBooleanv");
          params[0] = INT_TO_BOOLEAN(ctx->ReadBuffer->Name);
          break;
+      case GL_PROVOKING_VERTEX_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetBooleanv");
+         params[0] = ctx->Light.ProvokingVertex;
+         break;
+      case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetBooleanv");
+         params[0] = ctx->Const.QuadsFollowProvokingVertexConvention;
+         break;
       case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
          CHECK_EXT1(ARB_fragment_shader, "GetBooleanv");
          params[0] = INT_TO_BOOLEAN(ctx->Const.FragmentProgram.MaxUniformComponents);
@@ -3649,6 +3657,14 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
          CHECK_EXT1(EXT_framebuffer_blit, "GetFloatv");
          params[0] = (GLfloat)(ctx->ReadBuffer->Name);
          break;
+      case GL_PROVOKING_VERTEX_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Light.ProvokingVertex);
+         break;
+      case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetFloatv");
+         params[0] = BOOLEAN_TO_FLOAT(ctx->Const.QuadsFollowProvokingVertexConvention);
+         break;
       case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
          CHECK_EXT1(ARB_fragment_shader, "GetFloatv");
          params[0] = (GLfloat)(ctx->Const.FragmentProgram.MaxUniformComponents);
@@ -5463,6 +5479,14 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
          CHECK_EXT1(EXT_framebuffer_blit, "GetIntegerv");
          params[0] = ctx->ReadBuffer->Name;
          break;
+      case GL_PROVOKING_VERTEX_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Light.ProvokingVertex);
+         break;
+      case GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT:
+         CHECK_EXT1(EXT_provoking_vertex, "GetIntegerv");
+         params[0] = BOOLEAN_TO_INT(ctx->Const.QuadsFollowProvokingVertexConvention);
+         break;
       case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
          CHECK_EXT1(ARB_fragment_shader, "GetIntegerv");
          params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
index 43ee5fff109463d06e128b3df68ccbf5768ed235..5666ad0e42e8df93e848df847c33e4858501b9c7 100644 (file)
@@ -976,6 +976,13 @@ StateVars = [
        ( "GL_READ_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->ReadBuffer->Name"], "",
          ["EXT_framebuffer_blit"] ),
 
+       # GL_EXT_provoking_vertex
+       ( "GL_PROVOKING_VERTEX_EXT", GLboolean,
+         ["ctx->Light.ProvokingVertex"], "", ["EXT_provoking_vertex"] ),
+       ( "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT", GLboolean,
+         ["ctx->Const.QuadsFollowProvokingVertexConvention"], "",
+         ["EXT_provoking_vertex"] ),
+
        # GL_ARB_fragment_shader
        ( "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB", GLint,
          ["ctx->Const.FragmentProgram.MaxUniformComponents"], "",