diff options
author | Brian Paul <[email protected]> | 2003-05-01 22:44:02 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-05-01 22:44:02 +0000 |
commit | 92f9785c727ea10ff5f8dc9770f0e8f388fcea70 (patch) | |
tree | 10335899a8205128723f6b459d827e918bbc2d86 /src/mesa/main/get.c | |
parent | 09b00c5ded8e6211c9c79be600bb8c8ecad0d8fc (diff) |
Use ctx->Const.MaxTextureImageUnits and MaxTextureCoordUnits in more places.
Misc vertex array / vertex program changes.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r-- | src/mesa/main/get.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index dd1c0016a98..7d61d49b855 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1002,7 +1002,8 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) /* GL_ARB_multitexture */ case GL_MAX_TEXTURE_UNITS_ARB: CHECK_EXTENSION_B(ARB_multitexture, pname); - *params = INT_TO_BOOL(ctx->Const.MaxTextureUnits); + *params = INT_TO_BOOL(MIN2(ctx->Const.MaxTextureImageUnits, + ctx->Const.MaxTextureCoordUnits)); break; case GL_ACTIVE_TEXTURE_ARB: CHECK_EXTENSION_B(ARB_multitexture, pname); @@ -2501,7 +2502,8 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) /* GL_ARB_multitexture */ case GL_MAX_TEXTURE_UNITS_ARB: CHECK_EXTENSION_D(ARB_multitexture, pname); - *params = (GLdouble) ctx->Const.MaxTextureUnits; + *params = (GLdouble) MIN2(ctx->Const.MaxTextureImageUnits, + ctx->Const.MaxTextureCoordUnits); break; case GL_ACTIVE_TEXTURE_ARB: CHECK_EXTENSION_D(ARB_multitexture, pname); @@ -4000,7 +4002,8 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) /* GL_ARB_multitexture */ case GL_MAX_TEXTURE_UNITS_ARB: CHECK_EXTENSION_F(ARB_multitexture, pname); - *params = (GLfloat) ctx->Const.MaxTextureUnits; + *params = (GLfloat) MIN2(ctx->Const.MaxTextureImageUnits, + ctx->Const.MaxTextureCoordUnits); break; case GL_ACTIVE_TEXTURE_ARB: CHECK_EXTENSION_F(ARB_multitexture, pname); @@ -5472,7 +5475,8 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) /* GL_ARB_multitexture */ case GL_MAX_TEXTURE_UNITS_ARB: CHECK_EXTENSION_I(ARB_multitexture, pname); - *params = ctx->Const.MaxTextureUnits; + *params = MIN2(ctx->Const.MaxTextureImageUnits, + ctx->Const.MaxTextureCoordUnits); break; case GL_ACTIVE_TEXTURE_ARB: CHECK_EXTENSION_I(ARB_multitexture, pname); |