aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 16:00:29 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 16:00:29 +0000
commitb40894093babb10f3cd155f11ff2d6c710372395 (patch)
treee6e94e5aa39ca9d5a653af567145e4b5dda25d61 /mesalib/src/mesa/main/texstate.c
parentd27419efcdaaccb40e0f10c549a6b732a2f29e81 (diff)
parent14b1cb8d5a27ec9716d3f790fce95f0469e35605 (diff)
downloadvcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.gz
vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.bz2
vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/texstate.c')
-rw-r--r--mesalib/src/mesa/main/texstate.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index 8292d43eb..c735e18af 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -31,9 +31,7 @@
#include "glheader.h"
#include "mfeatures.h"
#include "colormac.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
#include "enums.h"
#include "macros.h"
@@ -309,10 +307,6 @@ _mesa_ActiveTextureARB(GLenum texture)
/* update current stack pointer */
ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
}
-
- if (ctx->Driver.ActiveTexture) {
- (*ctx->Driver.ActiveTexture)( ctx, (GLuint) texUnit );
- }
}
@@ -324,11 +318,18 @@ _mesa_ClientActiveTextureARB(GLenum texture)
GLuint texUnit = texture - GL_TEXTURE0;
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glClientActiveTexture %s\n",
+ _mesa_lookup_enum_by_nr(texture));
+
if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");
return;
}
+ if (ctx->Array.ActiveTexture == texUnit)
+ return;
+
FLUSH_VERTICES(ctx, _NEW_ARRAY);
ctx->Array.ActiveTexture = texUnit;
}
@@ -362,9 +363,6 @@ update_texture_matrices( GLcontext *ctx )
if (ctx->Texture.Unit[u]._ReallyEnabled &&
ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY)
ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u);
-
- if (ctx->Driver.TextureMatrix)
- ctx->Driver.TextureMatrix( ctx, u, ctx->TextureMatrixStack[u].Top);
}
}
}
@@ -759,9 +757,7 @@ _mesa_init_texture(GLcontext *ctx)
ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._EnabledUnits = 0x0;
ctx->Texture.SharedPalette = GL_FALSE;
-#if FEATURE_colortable
_mesa_init_colortable(&ctx->Texture.Palette);
-#endif
for (u = 0; u < MAX_TEXTURE_UNITS; u++)
init_texture_unit(ctx, u);
@@ -802,10 +798,8 @@ _mesa_free_texture_data(GLcontext *ctx)
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
-#if FEATURE_colortable
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++)
_mesa_free_colortable_data(&ctx->Texture.Unit[u].ColorTable);
-#endif
}