diff options
author | Brian Paul <[email protected]> | 2004-04-10 19:50:33 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-04-10 19:50:33 +0000 |
commit | 2db8fe2906ee3942dcd18d86eba2841e6539018e (patch) | |
tree | bebdcc306846e47904f07269bb70d3ae1cd6240c /src | |
parent | 089645799cad23784d02db229cec44422c46cdce (diff) |
fix minor glitch with GL_DEPTH_COMPONENT textures
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texstate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index b3204376d5f..a926ff135b4 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2946,7 +2946,7 @@ update_texture_state( GLcontext *ctx ) if (texUnit->_ReallyEnabled) ctx->Texture._EnabledUnits |= (1 << unit); - if ( texUnit->EnvMode == GL_COMBINE ) { + if (texUnit->EnvMode == GL_COMBINE) { texUnit->_CurrentCombine = & texUnit->Combine; } else { @@ -2954,6 +2954,9 @@ update_texture_state( GLcontext *ctx ) if (format == GL_COLOR_INDEX) { format = GL_RGBA; /* a bit of a hack */ } + else if (format == GL_DEPTH_COMPONENT) { + format = texUnit->_Current->DepthMode; + } calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format); texUnit->_CurrentCombine = & texUnit->_EnvMode; } |