diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-16 10:23:28 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-16 10:27:33 -0600 |
commit | 479a807e01bc980aa2a3c9c56c20ba53cc6e7d60 (patch) | |
tree | cfd5937ff86bbc039ed73939219e2e7bb8ee7843 /src/mesa/main | |
parent | 7f32834df3c428fa283e966982926c94630b1b8e (diff) |
mesa: add GL_POLYGON_OFFSET_POINT/LINE/FILL queries, remove GL_TEXTURE_ENV_COLOR, GL_TEXTURE_ENV_MODE
Issues found by Bob Ellison.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/get.c | 63 | ||||
-rw-r--r-- | src/mesa/main/get_gen.py | 9 |
2 files changed, 30 insertions, 42 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index ac437a86e2..4674c44a3f 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -749,6 +749,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) case GL_POLYGON_OFFSET_UNITS: params[0] = FLOAT_TO_BOOLEAN(ctx->Polygon.OffsetUnits ); break; + case GL_POLYGON_OFFSET_POINT: + params[0] = ctx->Polygon.OffsetPoint; + break; + case GL_POLYGON_OFFSET_LINE: + params[0] = ctx->Polygon.OffsetLine; + break; + case GL_POLYGON_OFFSET_FILL: + params[0] = ctx->Polygon.OffsetFill; + break; case GL_POLYGON_SMOOTH: params[0] = ctx->Polygon.SmoothFlag; break; @@ -891,18 +900,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) CHECK_EXT1(MESA_texture_array, "GetBooleanv"); params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name); break; - case GL_TEXTURE_ENV_COLOR: - { - const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor; - params[0] = FLOAT_TO_BOOLEAN(color[0]); - params[1] = FLOAT_TO_BOOLEAN(color[1]); - params[2] = FLOAT_TO_BOOLEAN(color[2]); - params[3] = FLOAT_TO_BOOLEAN(color[3]); - } - break; - case GL_TEXTURE_ENV_MODE: - params[0] = ENUM_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode); - break; case GL_TEXTURE_GEN_S: params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0); break; @@ -2596,6 +2593,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) case GL_POLYGON_OFFSET_UNITS: params[0] = ctx->Polygon.OffsetUnits ; break; + case GL_POLYGON_OFFSET_POINT: + params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetPoint); + break; + case GL_POLYGON_OFFSET_LINE: + params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetLine); + break; + case GL_POLYGON_OFFSET_FILL: + params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.OffsetFill); + break; case GL_POLYGON_SMOOTH: params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.SmoothFlag); break; @@ -2738,18 +2744,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) CHECK_EXT1(MESA_texture_array, "GetFloatv"); params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name); break; - case GL_TEXTURE_ENV_COLOR: - { - const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor; - params[0] = color[0]; - params[1] = color[1]; - params[2] = color[2]; - params[3] = color[3]; - } - break; - case GL_TEXTURE_ENV_MODE: - params[0] = ENUM_TO_FLOAT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode); - break; case GL_TEXTURE_GEN_S: params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)); break; @@ -4443,6 +4437,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) case GL_POLYGON_OFFSET_UNITS: params[0] = IROUND(ctx->Polygon.OffsetUnits ); break; + case GL_POLYGON_OFFSET_POINT: + params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetPoint); + break; + case GL_POLYGON_OFFSET_LINE: + params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetLine); + break; + case GL_POLYGON_OFFSET_FILL: + params[0] = BOOLEAN_TO_INT(ctx->Polygon.OffsetFill); + break; case GL_POLYGON_SMOOTH: params[0] = BOOLEAN_TO_INT(ctx->Polygon.SmoothFlag); break; @@ -4585,18 +4588,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) CHECK_EXT1(MESA_texture_array, "GetIntegerv"); params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name; break; - case GL_TEXTURE_ENV_COLOR: - { - const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor; - params[0] = FLOAT_TO_INT(color[0]); - params[1] = FLOAT_TO_INT(color[1]); - params[2] = FLOAT_TO_INT(color[2]); - params[3] = FLOAT_TO_INT(color[3]); - } - break; - case GL_TEXTURE_ENV_MODE: - params[0] = ENUM_TO_INT(ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode); - break; case GL_TEXTURE_GEN_S: params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)); break; diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index c307058da6..653deefa72 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -372,6 +372,9 @@ StateVars = [ ( "GL_POLYGON_OFFSET_BIAS_EXT", GLfloat, ["ctx->Polygon.OffsetUnits"], "", None ), ( "GL_POLYGON_OFFSET_FACTOR", GLfloat, ["ctx->Polygon.OffsetFactor "], "", None ), ( "GL_POLYGON_OFFSET_UNITS", GLfloat, ["ctx->Polygon.OffsetUnits "], "", None ), + ( "GL_POLYGON_OFFSET_POINT", GLboolean, ["ctx->Polygon.OffsetPoint"], "", None ), + ( "GL_POLYGON_OFFSET_LINE", GLboolean, ["ctx->Polygon.OffsetLine"], "", None ), + ( "GL_POLYGON_OFFSET_FILL", GLboolean, ["ctx->Polygon.OffsetFill"], "", None ), ( "GL_POLYGON_SMOOTH", GLboolean, ["ctx->Polygon.SmoothFlag"], "", None ), ( "GL_POLYGON_SMOOTH_HINT", GLenum, ["ctx->Hint.PolygonSmooth"], "", None ), ( "GL_POLYGON_STIPPLE", GLboolean, ["ctx->Polygon.StippleFlag"], "", None ), @@ -437,12 +440,6 @@ StateVars = [ ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1DArray->Name"], "", ["MESA_texture_array"] ), ( "GL_TEXTURE_BINDING_2D_ARRAY_EXT", GLint, ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name"], "", ["MESA_texture_array"] ), - ( "GL_TEXTURE_ENV_COLOR", GLfloatN, - ["color[0]", "color[1]", "color[2]", "color[3]"], - "const GLfloat *color = ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvColor;", - None ), - ( "GL_TEXTURE_ENV_MODE", GLenum, - ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].EnvMode"], "", None ), ( "GL_TEXTURE_GEN_S", GLboolean, ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)"], "", None ), ( "GL_TEXTURE_GEN_T", GLboolean, |