/*
* 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"),
-/*
+/**
* 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,
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)
#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