diff options
author | Brian Paul <[email protected]> | 2006-10-04 15:21:23 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-04 15:21:23 +0000 |
commit | 9b507639ab31b2d611344f061614e71d47c9a84c (patch) | |
tree | 7b340b21ed20f9fa4c68ebf67deec6563144cd0b /src/mesa/swrast | |
parent | da62bcecfb92978d7243928cfa0fb076b3de762d (diff) |
call _swrast_span_default_color() to simplify _swrast_Bitmap(), improved comments
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_bitmap.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index ab0db3203eb..5d0e68424c9 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.2 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -39,8 +39,10 @@ -/* +/** * Render a bitmap. + * Called via ctx->Driver.Bitmap() + * All parameter error checking will have been done before this is called. */ void _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, @@ -82,20 +84,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, INIT_SPAN(span, GL_BITMAP, width, 0, SPAN_XY); - if (ctx->Visual.rgbMode) { - span.interpMask |= SPAN_RGBA; - span.red = FloatToFixed(ctx->Current.RasterColor[0] * CHAN_MAXF); - span.green = FloatToFixed(ctx->Current.RasterColor[1] * CHAN_MAXF); - span.blue = FloatToFixed(ctx->Current.RasterColor[2] * CHAN_MAXF); - span.alpha = FloatToFixed(ctx->Current.RasterColor[3] * CHAN_MAXF); - span.redStep = span.greenStep = span.blueStep = span.alphaStep = 0; - } - else { - span.interpMask |= SPAN_INDEX; - span.index = FloatToFixed(ctx->Current.RasterIndex); - span.indexStep = 0; - } - + _swrast_span_default_color(ctx, &span); if (ctx->Depth.Test) _swrast_span_default_z(ctx, &span); if (swrast->_FogEnabled) @@ -177,7 +166,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, #if 0 /* * XXX this is another way to implement Bitmap. Use horizontal runs of - * fragments, initializing the mask array to indicate which fragmens to + * fragments, initializing the mask array to indicate which fragments to * draw or skip. */ void |