summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_bitmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_bitmap.c')
-rw-r--r--src/mesa/swrast/s_bitmap.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 17387ba0afa..5f129933149 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.11 2001/06/18 23:55:18 brianp Exp $ */
+/* $Id: s_bitmap.c,v 1.12 2001/06/26 21:15:36 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -49,7 +49,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
struct pixel_buffer *PB = swrast->PB;
GLint row, col;
GLdepth fragZ;
- GLfloat fogCoord;
+ GLfloat fog;
ASSERT(ctx->RenderMode == GL_RENDER);
ASSERT(bitmap);
@@ -75,15 +75,13 @@ _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) {
- fogCoord = ctx->Current.FogCoord;
- }
- else {
- fogCoord = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance);
- }
+ if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT)
+ fog = _mesa_z_to_fogfactor(ctx, ctx->Current.FogCoord);
+ else
+ fog = _mesa_z_to_fogfactor(ctx, ctx->Current.RasterDistance);
}
else {
- fogCoord = 0.0;
+ fog = 0.0;
}
for (row=0; row<height; row++) {
@@ -95,7 +93,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
GLubyte mask = 1U << (unpack->SkipPixels & 0x7);
for (col=0; col<width; col++) {
if (*src & mask) {
- PB_WRITE_PIXEL( PB, px+col, py+row, fragZ, fogCoord );
+ PB_WRITE_PIXEL( PB, px+col, py+row, fragZ, fog );
}
if (mask == 128U) {
src++;
@@ -117,7 +115,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
GLubyte mask = 128U >> (unpack->SkipPixels & 0x7);
for (col=0; col<width; col++) {
if (*src & mask) {
- PB_WRITE_PIXEL( PB, px+col, py+row, fragZ, fogCoord );
+ PB_WRITE_PIXEL( PB, px+col, py+row, fragZ, fog );
}
if (mask == 1U) {
src++;