diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-02-23 04:12:57 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-02-23 04:12:57 +0000 |
commit | 25060c1f29f3ad52f9a3b5f6f68df238dbc2de8a (patch) | |
tree | 1bf086dfce328e2c39ee3ab106f2356b1027ebf0 /src | |
parent | b8d6607acd3b6d18dab0c7247d5e0fc72e98ceae (diff) |
test if active texture is really changed in _mesa_ActiveTexture()
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texstate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e640cea001..b1b7535a33 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.93 2003/01/21 23:58:29 brianp Exp $ */ +/* $Id: texstate.c,v 1.94 2003/02/23 04:12:57 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2447,7 +2447,7 @@ void _mesa_ActiveTextureARB( GLenum target ) { GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = target - GL_TEXTURE0; + const GLuint texUnit = target - GL_TEXTURE0; ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) @@ -2460,6 +2460,9 @@ _mesa_ActiveTextureARB( GLenum target ) return; } + if (ctx->Texture.CurrentUnit == texUnit) + return; + FLUSH_VERTICES(ctx, _NEW_TEXTURE); ctx->Texture.CurrentUnit = texUnit; |