mesa: add GL_POLYGON_OFFSET_POINT/LINE/FILL queries, remove GL_TEXTURE_ENV_COLOR...
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jul 2008 16:23:28 +0000 (10:23 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jul 2008 16:27:33 +0000 (10:27 -0600)
Issues found by Bob Ellison.

src/mesa/main/get.c
src/mesa/main/get_gen.py

index ac437a86e299eb78356745e2fd6b00b01886250e..4674c44a3f2d734afec74c3d175be422d6ea4d9c 100644 (file)
@@ -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;
index c307058da65780cd1da2de708fce308a1b688410..653deefa72667cbae560775d4be277b62a1bc796 100644 (file)
@@ -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,