summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-01-16 15:22:13 +0000
committerBrian Paul <[email protected]>2003-01-16 15:22:13 +0000
commit08e1ef79ccaf98f64ee9f76c8a6e5a2405ce85ce (patch)
tree9cd7d2300500f8646557bc8fe86f7c0855c9fb95 /src
parented96f466373035c1b7033d57b22a483d7bd48185 (diff)
update CurrentStack in glActiveTexture if needed (bug 669080)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texstate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index d234b176813..b511b1a8d36 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.90 2002/12/30 19:24:05 alanh Exp $ */
+/* $Id: texstate.c,v 1.91 2003/01/16 15:22:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2434,7 +2434,13 @@ _mesa_ActiveTextureARB( GLenum target )
}
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+
ctx->Texture.CurrentUnit = texUnit;
+ if (ctx->Transform.MatrixMode == GL_TEXTURE) {
+ /* update current stack pointer */
+ ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
+ }
+
if (ctx->Driver.ActiveTexture) {
(*ctx->Driver.ActiveTexture)( ctx, (GLuint) texUnit );
}