From f2f89b01d2179775e240145ce62923854c1c8936 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 May 2009 12:31:56 -0600 Subject: [PATCH] mesa: glGet queries for GL_EXT_provoking_vertex --- src/mesa/main/get.c | 24 ++++++++++++++++++++++++ src/mesa/main/get_gen.py | 7 +++++++ 2 files changed, 31 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 1ed6fc3..516159b 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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; diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 43ee5ff..5666ad0 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -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"], "", -- 2.7.4