From 45224face0d942094cc4426d2c84d441661a4c62 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 7 Sep 1999 22:31:30 +0000 Subject: removed TexCoordUnit from GLcontext, use Array.ActiveTexture instead --- src/mesa/main/context.c | 5 +---- src/mesa/main/enable.c | 8 ++++---- src/mesa/main/texstate.c | 3 +-- src/mesa/main/varray.c | 6 +++--- 4 files changed, 9 insertions(+), 13 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index f227c9f432..ee95173d07 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.5 1999/09/04 14:40:49 keithw Exp $ */ +/* $Id: context.c,v 1.6 1999/09/07 22:31:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1004,9 +1004,6 @@ static void initialize_context( GLcontext *ctx ) ctx->IntegerAccumMode = GL_TRUE; ctx->IntegerAccumScaler = 0.0; - /* multitexture */ - ctx->TexCoordUnit = 0; - /* Renderer and client attribute stacks */ ctx->AttribStackDepth = 0; ctx->ClientAttribStackDepth = 0; diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 429a7b1141..29d08283af 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1,4 +1,4 @@ -/* $Id: enable.c,v 1.3 1999/08/26 14:50:49 keithw Exp $ */ +/* $Id: enable.c,v 1.4 1999/09/07 22:31:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -448,7 +448,7 @@ void gl_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Array.Index.Enabled = state; break; case GL_TEXTURE_COORD_ARRAY: - ctx->Array.TexCoord[ctx->TexCoordUnit].Enabled = state; + ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state; break; case GL_EDGE_FLAG_ARRAY: ctx->Array.EdgeFlag.Enabled = state; @@ -638,7 +638,7 @@ GLboolean gl_IsEnabled( GLcontext* ctx, GLenum cap ) case GL_INDEX_ARRAY: return ctx->Array.Index.Enabled; case GL_TEXTURE_COORD_ARRAY: - return ctx->Array.TexCoord[ctx->TexCoordUnit].Enabled; + return ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled; case GL_EDGE_FLAG_ARRAY: return ctx->Array.EdgeFlag.Enabled; default: @@ -671,7 +671,7 @@ static void gl_client_state( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Array.Index.Enabled = state; break; case GL_TEXTURE_COORD_ARRAY: - ctx->Array.TexCoord[ctx->TexCoordUnit].Enabled = state; + ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state; break; case GL_EDGE_FLAG_ARRAY: ctx->Array.EdgeFlag.Enabled = state; diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index eee5eaa0e4..1b19a389cf 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */ +/* $Id: texstate.c,v 1.2 1999/09/07 22:31:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1039,7 +1039,6 @@ void gl_ActiveTexture( GLcontext *ctx, GLenum target ) if (target >= GL_TEXTURE0_ARB && target < GL_TEXTURE0_ARB + maxUnits) { GLint texUnit = target - GL_TEXTURE0_ARB; - ctx->TexCoordUnit = texUnit; ctx->Texture.CurrentUnit = texUnit; ctx->Texture.CurrentTransformUnit = texUnit; if (ctx->Driver.ActiveTexture) { diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index aab630ca23..fb8510ec24 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -1,4 +1,4 @@ -/* $Id: varray.c,v 1.2 1999/08/26 14:50:49 keithw Exp $ */ +/* $Id: varray.c,v 1.3 1999/09/07 22:31:30 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -285,7 +285,7 @@ void GLAPIENTRY glTexCoordPointer(CTX_ARG GLint size, GLenum type, CHECK_CONTEXT; ctx = CC; - texUnit = ctx->TexCoordUnit; + texUnit = ctx->Array.ActiveTexture; if (size<1 || size>4) { gl_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(size)" ); @@ -1135,7 +1135,7 @@ void GLAPIENTRY glInterleavedArrays(CTX_ARG GLenum format, GLsizei stride, gl_DisableClientState( ctx, GL_INDEX_ARRAY ); /* Texcoords */ - coordUnitSave = ctx->TexCoordUnit; + coordUnitSave = ctx->Array.ActiveTexture; if (tflag) { GLint i; GLint factor = ctx->Array.TexCoordInterleaveFactor; -- cgit v1.2.3