summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_bitmap.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-05-30 15:22:04 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-05-30 15:22:04 +0000
commitb5d3f2c52103c6bd834838695cd753ca26991bd6 (patch)
tree07d65314200c04ebeff9b9313ec12aa3284d3b01 /src/mesa/swrast/s_bitmap.c
parent529e48bb0fd53e3a47d01f42c0acfe7faa373912 (diff)
added current raster fog coord and related code
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r--src/mesa/swrast/s_bitmap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index aee5f7a088..0c4592bc87 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.9 2001/05/09 17:21:51 brianp Exp $ */
+/* $Id: s_bitmap.c,v 1.10 2001/05/30 15:22:05 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -74,10 +74,15 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
fragZ = (GLdepth) ( ctx->Current.RasterPos[2] * ctx->DepthMaxF);
- if (ctx->Fog.Enabled)
- _mesa_win_fog_coords_from_z( ctx, 1, &fragZ, &fogCoord );
- else
+ if (ctx->Fog.Enabled) {
+ if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT)
+ fogCoord = ctx->Current.FogCoord;
+ else
+ fogCoord = ctx->Current.RasterDistance;
+ }
+ else {
fogCoord = 0.0;
+ }
for (row=0; row<height; row++) {
const GLubyte *src = (const GLubyte *) _mesa_image_address( unpack,