-/* $Id: get.c,v 1.61 2001/05/29 15:23:49 brianp Exp $ */
+/* $Id: get.c,v 1.62 2001/06/12 22:08:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
-
void
_mesa_GetBooleanv( GLenum pname, GLboolean *params )
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
GLuint texUnit = ctx->Texture.CurrentUnit;
- GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;
const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
params[3] = FLOAT_TO_BOOL(ctx->Current.RasterPos[3]);
break;
case GL_CURRENT_RASTER_TEXTURE_COORDS:
- params[0] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texTransformUnit][0]);
- params[1] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texTransformUnit][1]);
- params[2] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texTransformUnit][2]);
- params[3] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texTransformUnit][3]);
+ params[0] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texUnit][0]);
+ params[1] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texUnit][1]);
+ params[2] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texUnit][2]);
+ params[3] = FLOAT_TO_BOOL(ctx->Current.RasterMultiTexCoord[texUnit][3]);
break;
case GL_CURRENT_RASTER_POSITION_VALID:
*params = ctx->Current.RasterPosValid;
break;
case GL_CURRENT_TEXTURE_COORDS:
FLUSH_CURRENT(ctx, 0);
- params[0] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texTransformUnit][0]);
- params[1] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texTransformUnit][1]);
- params[2] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texTransformUnit][2]);
- params[3] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texTransformUnit][3]);
+ params[0] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texUnit][0]);
+ params[1] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texUnit][1]);
+ params[2] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texUnit][2]);
+ params[3] = FLOAT_TO_BOOL(ctx->Current.Texcoord[texUnit][3]);
break;
case GL_DEPTH_BIAS:
*params = FLOAT_TO_BOOL(ctx->Pixel.DepthBias);
case GL_TEXTURE_MATRIX:
for (i=0;i<16;i++) {
params[i] =
- FLOAT_TO_BOOL(ctx->TextureMatrix[texTransformUnit].m[i]);
+ FLOAT_TO_BOOL(ctx->TextureMatrix[texUnit].m[i]);
}
break;
case GL_TEXTURE_STACK_DEPTH:
- *params = INT_TO_BOOL(ctx->TextureStackDepth[texTransformUnit] + 1);
+ *params = INT_TO_BOOL(ctx->TextureStackDepth[texUnit] + 1);
break;
case GL_UNPACK_ALIGNMENT:
*params = INT_TO_BOOL(ctx->Unpack.Alignment);
{
GLfloat tm[16];
GLuint i;
- _math_transposef(tm, ctx->TextureMatrix[texTransformUnit].m);
+ _math_transposef(tm, ctx->TextureMatrix[texUnit].m);
for (i=0;i<16;i++) {
params[i] = FLOAT_TO_BOOL(tm[i]);
}
}
-
-
void
_mesa_GetDoublev( GLenum pname, GLdouble *params )
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
GLuint texUnit = ctx->Texture.CurrentUnit;
- GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;
const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
params[3] = (GLdouble) ctx->Current.RasterPos[3];
break;
case GL_CURRENT_RASTER_TEXTURE_COORDS:
- params[0] = (GLdouble) ctx->Current.RasterMultiTexCoord[texTransformUnit][0];
- params[1] = (GLdouble) ctx->Current.RasterMultiTexCoord[texTransformUnit][1];
- params[2] = (GLdouble) ctx->Current.RasterMultiTexCoord[texTransformUnit][2];
- params[3] = (GLdouble) ctx->Current.RasterMultiTexCoord[texTransformUnit][3];
+ params[0] = (GLdouble) ctx->Current.RasterMultiTexCoord[texUnit][0];
+ params[1] = (GLdouble) ctx->Current.RasterMultiTexCoord[texUnit][1];
+ params[2] = (GLdouble) ctx->Current.RasterMultiTexCoord[texUnit][2];
+ params[3] = (GLdouble) ctx->Current.RasterMultiTexCoord[texUnit][3];
break;
case GL_CURRENT_RASTER_POSITION_VALID:
*params = (GLdouble) ctx->Current.RasterPosValid;
break;
case GL_CURRENT_TEXTURE_COORDS:
FLUSH_CURRENT(ctx, 0);
- params[0] = (GLdouble) ctx->Current.Texcoord[texTransformUnit][0];
- params[1] = (GLdouble) ctx->Current.Texcoord[texTransformUnit][1];
- params[2] = (GLdouble) ctx->Current.Texcoord[texTransformUnit][2];
- params[3] = (GLdouble) ctx->Current.Texcoord[texTransformUnit][3];
+ params[0] = (GLdouble) ctx->Current.Texcoord[texUnit][0];
+ params[1] = (GLdouble) ctx->Current.Texcoord[texUnit][1];
+ params[2] = (GLdouble) ctx->Current.Texcoord[texUnit][2];
+ params[3] = (GLdouble) ctx->Current.Texcoord[texUnit][3];
break;
case GL_DEPTH_BIAS:
*params = (GLdouble) ctx->Pixel.DepthBias;
break;
case GL_TEXTURE_MATRIX:
for (i=0;i<16;i++) {
- params[i] = (GLdouble) ctx->TextureMatrix[texTransformUnit].m[i];
+ params[i] = (GLdouble) ctx->TextureMatrix[texUnit].m[i];
}
break;
case GL_TEXTURE_STACK_DEPTH:
- *params = (GLdouble) (ctx->TextureStackDepth[texTransformUnit] + 1);
+ *params = (GLdouble) (ctx->TextureStackDepth[texUnit] + 1);
break;
case GL_UNPACK_ALIGNMENT:
*params = (GLdouble) ctx->Unpack.Alignment;
{
GLfloat tm[16];
GLuint i;
- _math_transposef(tm, ctx->TextureMatrix[texTransformUnit].m);
+ _math_transposef(tm, ctx->TextureMatrix[texUnit].m);
for (i=0;i<16;i++) {
params[i] = (GLdouble) tm[i];
}
}
-
-
void
_mesa_GetFloatv( GLenum pname, GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
GLuint texUnit = ctx->Texture.CurrentUnit;
- GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;
const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
params[3] = ctx->Current.RasterPos[3];
break;
case GL_CURRENT_RASTER_TEXTURE_COORDS:
- params[0] = ctx->Current.RasterMultiTexCoord[texTransformUnit][0];
- params[1] = ctx->Current.RasterMultiTexCoord[texTransformUnit][1];
- params[2] = ctx->Current.RasterMultiTexCoord[texTransformUnit][2];
- params[3] = ctx->Current.RasterMultiTexCoord[texTransformUnit][3];
+ params[0] = ctx->Current.RasterMultiTexCoord[texUnit][0];
+ params[1] = ctx->Current.RasterMultiTexCoord[texUnit][1];
+ params[2] = ctx->Current.RasterMultiTexCoord[texUnit][2];
+ params[3] = ctx->Current.RasterMultiTexCoord[texUnit][3];
break;
case GL_CURRENT_RASTER_POSITION_VALID:
*params = (GLfloat) ctx->Current.RasterPosValid;
break;
case GL_CURRENT_TEXTURE_COORDS:
FLUSH_CURRENT(ctx, 0);
- params[0] = (GLfloat) ctx->Current.Texcoord[texTransformUnit][0];
- params[1] = (GLfloat) ctx->Current.Texcoord[texTransformUnit][1];
- params[2] = (GLfloat) ctx->Current.Texcoord[texTransformUnit][2];
- params[3] = (GLfloat) ctx->Current.Texcoord[texTransformUnit][3];
+ params[0] = (GLfloat) ctx->Current.Texcoord[texUnit][0];
+ params[1] = (GLfloat) ctx->Current.Texcoord[texUnit][1];
+ params[2] = (GLfloat) ctx->Current.Texcoord[texUnit][2];
+ params[3] = (GLfloat) ctx->Current.Texcoord[texUnit][3];
break;
case GL_DEPTH_BIAS:
*params = (GLfloat) ctx->Pixel.DepthBias;
break;
case GL_TEXTURE_MATRIX:
for (i=0;i<16;i++) {
- params[i] = ctx->TextureMatrix[texTransformUnit].m[i];
+ params[i] = ctx->TextureMatrix[texUnit].m[i];
}
break;
case GL_TEXTURE_STACK_DEPTH:
- *params = (GLfloat) (ctx->TextureStackDepth[texTransformUnit] + 1);
+ *params = (GLfloat) (ctx->TextureStackDepth[texUnit] + 1);
break;
case GL_UNPACK_ALIGNMENT:
*params = (GLfloat) ctx->Unpack.Alignment;
_math_transposef(params, ctx->ProjectionMatrix.m);
break;
case GL_TRANSPOSE_TEXTURE_MATRIX_ARB:
- _math_transposef(params, ctx->TextureMatrix[texTransformUnit].m);
+ _math_transposef(params, ctx->TextureMatrix[texUnit].m);
break;
/* GL_HP_occlusion_test */
}
-
-
void
_mesa_GetIntegerv( GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
GLuint i;
GLuint texUnit = ctx->Texture.CurrentUnit;
- GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;
const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
params[3] = (GLint) ctx->Current.RasterPos[3];
break;
case GL_CURRENT_RASTER_TEXTURE_COORDS:
- params[0] = (GLint) ctx->Current.RasterMultiTexCoord[texTransformUnit][0];
- params[1] = (GLint) ctx->Current.RasterMultiTexCoord[texTransformUnit][1];
- params[2] = (GLint) ctx->Current.RasterMultiTexCoord[texTransformUnit][2];
- params[3] = (GLint) ctx->Current.RasterMultiTexCoord[texTransformUnit][3];
+ params[0] = (GLint) ctx->Current.RasterMultiTexCoord[texUnit][0];
+ params[1] = (GLint) ctx->Current.RasterMultiTexCoord[texUnit][1];
+ params[2] = (GLint) ctx->Current.RasterMultiTexCoord[texUnit][2];
+ params[3] = (GLint) ctx->Current.RasterMultiTexCoord[texUnit][3];
break;
case GL_CURRENT_RASTER_POSITION_VALID:
*params = (GLint) ctx->Current.RasterPosValid;
break;
case GL_CURRENT_TEXTURE_COORDS:
FLUSH_CURRENT(ctx, 0);
- params[0] = (GLint) ctx->Current.Texcoord[texTransformUnit][0];
- params[1] = (GLint) ctx->Current.Texcoord[texTransformUnit][1];
- params[2] = (GLint) ctx->Current.Texcoord[texTransformUnit][2];
- params[3] = (GLint) ctx->Current.Texcoord[texTransformUnit][3];
+ params[0] = (GLint) ctx->Current.Texcoord[texUnit][0];
+ params[1] = (GLint) ctx->Current.Texcoord[texUnit][1];
+ params[2] = (GLint) ctx->Current.Texcoord[texUnit][2];
+ params[3] = (GLint) ctx->Current.Texcoord[texUnit][3];
break;
case GL_DEPTH_BIAS:
*params = (GLint) ctx->Pixel.DepthBias;
break;
case GL_TEXTURE_MATRIX:
for (i=0;i<16;i++) {
- params[i] = (GLint) ctx->TextureMatrix[texTransformUnit].m[i];
+ params[i] = (GLint) ctx->TextureMatrix[texUnit].m[i];
}
break;
case GL_TEXTURE_STACK_DEPTH:
- *params = (GLint) (ctx->TextureStackDepth[texTransformUnit] + 1);
+ *params = (GLint) (ctx->TextureStackDepth[texUnit] + 1);
break;
case GL_UNPACK_ALIGNMENT:
*params = ctx->Unpack.Alignment;
{
GLfloat tm[16];
GLuint i;
- _math_transposef(tm, ctx->TextureMatrix[texTransformUnit].m);
+ _math_transposef(tm, ctx->TextureMatrix[texUnit].m);
for (i=0;i<16;i++) {
params[i] = (GLint) tm[i];
}
-/* $Id: texstate.c,v 1.51 2001/05/21 16:41:03 brianp Exp $ */
+/* $Id: texstate.c,v 1.52 2001/06/12 22:08:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint tUnit = ctx->Texture.CurrentTransformUnit;
+ GLuint tUnit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint tUnit = ctx->Texture.CurrentTransformUnit;
+ GLuint tUnit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint tUnit = ctx->Texture.CurrentTransformUnit;
+ GLuint tUnit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
- GLuint tUnit = ctx->Texture.CurrentTransformUnit;
+ GLuint tUnit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[tUnit];
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
ctx->Texture.CurrentUnit = texUnit;
- ctx->Texture.CurrentTransformUnit = texUnit;
if (ctx->Driver.ActiveTexture) {
(*ctx->Driver.ActiveTexture)( ctx, (GLuint) texUnit );
}