summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-05-09 17:21:51 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-05-09 17:21:51 +0000
commit78023e980891954ab1cd08a25dc3bac521220098 (patch)
treec214abe4c9784ac38eb8825f7a4449ef83c1bc86 /src
parent7b9ff48d022f43e129ad94e7ca9783a0b007a2c4 (diff)
don't call _mesa_win_fog_coords_from_z() if fog is disabled, fixes FP exception
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_bitmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index d91319c01b..aee5f7a088 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.8 2001/05/03 22:13:32 brianp Exp $ */
+/* $Id: s_bitmap.c,v 1.9 2001/05/09 17:21:51 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -74,7 +74,10 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
fragZ = (GLdepth) ( ctx->Current.RasterPos[2] * ctx->DepthMaxF);
- _mesa_win_fog_coords_from_z( ctx, 1, &fragZ, &fogCoord );
+ if (ctx->Fog.Enabled)
+ _mesa_win_fog_coords_from_z( ctx, 1, &fragZ, &fogCoord );
+ else
+ fogCoord = 0.0;
for (row=0; row<height; row++) {
const GLubyte *src = (const GLubyte *) _mesa_image_address( unpack,