diff options
author | Brian Paul <[email protected]> | 2001-06-26 21:15:35 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-06-26 21:15:35 +0000 |
commit | acc722d4b890da7ed0ede24751e2bcaf28cc1468 (patch) | |
tree | 38472ec2d8479c98189f2ce0f4e365ece59ea14e /src/mesa/swrast/s_drawpix.c | |
parent | 33170eeb185f5fe766374a749464497cdfab6931 (diff) |
More raster fog coord fixes.
New truncate vs. floor comments in drawpixels.c
Added current raster secondary color state, not used yet.
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index fb11af5e441..e618dc0a233 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.21 2001/06/18 23:55:18 brianp Exp $ */ +/* $Id: s_drawpix.c,v 1.22 2001/06/26 21:15:36 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -501,12 +501,10 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y, GLfloat fog; GLint i; - if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) { - fog = ctx->Current.RasterFogCoord; - } - else { + if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) + fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterFogCoord); + else fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); - } for (i = 0; i < drawWidth; i++) { zspan[i] = zval; @@ -747,12 +745,10 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, GLfloat fog; GLint i; - if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) { - fog = ctx->Current.RasterFogCoord; - } - else { + if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT) + fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterFogCoord); + else fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance); - } for (i=0;i<width;i++) { zspan[i] = z; |