summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-14 17:08:53 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-14 17:08:53 +0000
commit2db8041ffed9db2e68c55f18eedeaa95c23ac761 (patch)
tree79ab33fb1745cb2584951798f1628bac2669a101
parentd0492cf1377897c8113a109aa936ee7a7084b9c8 (diff)
fix depth texture tex env bug (#719903)
-rw-r--r--src/mesa/swrast/s_texture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index e497f9bba7..a47e6a72ae 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1,5 +1,3 @@
-/* $Id: s_texture.c,v 1.83 2003/03/04 19:17:31 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -3811,10 +3809,12 @@ texture_apply( const GLcontext *ctx,
format = texUnit->_Current->Image[baseLevel]->Format;
- if (format == GL_COLOR_INDEX || format == GL_DEPTH_COMPONENT
- || format == GL_YCBCR_MESA) {
+ if (format == GL_COLOR_INDEX || format == GL_YCBCR_MESA) {
format = GL_RGBA; /* a bit of a hack */
}
+ else if (format == GL_DEPTH_COMPONENT) {
+ format = texUnit->_Current->DepthMode;
+ }
switch (texUnit->EnvMode) {
case GL_REPLACE: