diff options
author | Brian Paul <[email protected]> | 2001-06-18 23:55:18 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-06-18 23:55:18 +0000 |
commit | af197f5f8f182c04ab29cd3c7a18a0cb95a1d9b7 (patch) | |
tree | 649bd925155c134f8cef5807ce356f227768db52 /src/mesa/swrast/s_bitmap.c | |
parent | aba535e765336ceddd23a303514ef7e223b8dc28 (diff) |
fix glDraw/CopyPixels w/ fog bug. minor fog code clean-ups.
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r-- | src/mesa/swrast/s_bitmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 0c4592bc871..17387ba0afa 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,4 +1,4 @@ -/* $Id: s_bitmap.c,v 1.10 2001/05/30 15:22:05 brianp Exp $ */ +/* $Id: s_bitmap.c,v 1.11 2001/06/18 23:55:18 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -75,10 +75,12 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, fragZ = (GLdepth) ( ctx->Current.RasterPos[2] * ctx->DepthMaxF); if (ctx->Fog.Enabled) { - if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) + if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) { fogCoord = ctx->Current.FogCoord; - else - fogCoord = ctx->Current.RasterDistance; + } + else { + fogCoord = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + } } else { fogCoord = 0.0; |