fix max viewport query
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 30 Jan 2005 17:18:08 +0000 (17:18 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 30 Jan 2005 17:18:08 +0000 (17:18 +0000)
src/mesa/main/get.c
src/mesa/main/get_gen.py

index 7b1351cadadcde5fa1844b074083b5322bffc8bc..d9d6a568f164044469dc0fc3482968113f2e8b76 100644 (file)
@@ -613,8 +613,8 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
          params[0] = INT_TO_BOOLEAN(MAX_TEXTURE_STACK_DEPTH);
          break;
       case GL_MAX_VIEWPORT_DIMS:
-         params[0] = INT_TO_BOOLEAN(MAX_WIDTH);
-         params[1] = INT_TO_BOOLEAN(MAX_HEIGHT);
+         params[0] = INT_TO_BOOLEAN(ctx->Const.MaxViewportWidth);
+         params[1] = INT_TO_BOOLEAN(ctx->Const.MaxViewportHeight);
          break;
       case GL_MODELVIEW_MATRIX:
          {
@@ -2416,8 +2416,8 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
          params[0] = (GLfloat)(MAX_TEXTURE_STACK_DEPTH);
          break;
       case GL_MAX_VIEWPORT_DIMS:
-         params[0] = (GLfloat)(MAX_WIDTH);
-         params[1] = (GLfloat)(MAX_HEIGHT);
+         params[0] = (GLfloat)(ctx->Const.MaxViewportWidth);
+         params[1] = (GLfloat)(ctx->Const.MaxViewportHeight);
          break;
       case GL_MODELVIEW_MATRIX:
          {
@@ -4219,8 +4219,8 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
          params[0] = MAX_TEXTURE_STACK_DEPTH;
          break;
       case GL_MAX_VIEWPORT_DIMS:
-         params[0] = MAX_WIDTH;
-         params[1] = MAX_HEIGHT;
+         params[0] = ctx->Const.MaxViewportWidth;
+         params[1] = ctx->Const.MaxViewportHeight;
          break;
       case GL_MODELVIEW_MATRIX:
          {
index c8f1834d1aa803f0b1188de4ee6e088aabd9d1ce..07c5fcccd96a6077d8e763d02549657d4ec70cf2 100644 (file)
@@ -297,7 +297,9 @@ StateVars = [
        ( "GL_MAX_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.MaxTextureLevels - 1)"], "", None ),
        ( "GL_MAX_3D_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.Max3DTextureLevels - 1)"], "", None ),
        ( "GL_MAX_TEXTURE_STACK_DEPTH", GLint, ["MAX_TEXTURE_STACK_DEPTH"], "", None ),
-       ( "GL_MAX_VIEWPORT_DIMS", GLint, ["MAX_WIDTH", "MAX_HEIGHT"], "", None ),
+       ( "GL_MAX_VIEWPORT_DIMS", GLint,
+         ["ctx->Const.MaxViewportWidth", "ctx->Const.MaxViewportHeight"],
+         "", None ),
        ( "GL_MODELVIEW_MATRIX", GLfloat,
          [ "matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]",
                "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]",