mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
don't call _mesa_win_fog_coords_from_z() if fog is disabled, fixes FP exception
This commit is contained in:
parent
7b9ff48d02
commit
78023e9808
1 changed files with 5 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue