diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-14 17:09:20 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2003-04-14 17:09:20 +0000 |
commit | 4df423d40e59e7c448036f0a0f3c83337dffd724 (patch) | |
tree | ce82185fea4a6c903502f09d2dcd0a9a5a5672a9 | |
parent | 79479d73801c72cba0d1a410b39e2cd3b01af89c (diff) |
fix depth texture tex env bug (#719903)
-rw-r--r-- | src/mesa/swrast/s_texture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 9354731b31..eee8416053 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -3539,10 +3539,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: |