From 9e8a961dd7d7b717a9fb4ecdea1c1b60ea355efe Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 20 May 2007 12:27:39 -0600 Subject: Overhaul/simplify SWvertex and SWspan attribute handling. Instead of separate fog/specular/texcoord/varying code, just treat all of them as generic attributes. Simplifies the point/line/triangle functions. --- src/mesa/swrast/s_bitmap.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/mesa/swrast/s_bitmap.c') diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 4c23705245..563b5fe602 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -83,15 +83,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, _swrast_validate_derived( ctx ); INIT_SPAN(span, GL_BITMAP, width, 0, SPAN_XY); - - _swrast_span_default_color(ctx, &span); - _swrast_span_default_secondary_color(ctx, &span); - if (ctx->Depth.Test) - _swrast_span_default_z(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); - if (ctx->Texture._EnabledCoordUnits) - _swrast_span_default_texcoords(ctx, &span); + _swrast_span_default_attribs(ctx, &span); for (row = 0; row < height; row++) { const GLubyte *src = (const GLubyte *) _mesa_image_address2d(unpack, @@ -189,20 +181,13 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, _swrast_validate_derived( ctx ); INIT_SPAN(span, GL_BITMAP, width, 0, SPAN_MASK); + _swrast_span_default_attribs(ctx, &span); /*span.arrayMask |= SPAN_MASK;*/ /* we'll init span.mask[] */ span.x = px; span.y = py; /*span.end = width;*/ - _swrast_span_default_color(ctx, &span); - if (ctx->Depth.Test) - _swrast_span_default_z(ctx, &span); - if (swrast->_FogEnabled) - _swrast_span_default_fog(ctx, &span); - if (ctx->Texture._EnabledCoordUnits) - _swrast_span_default_texcoords(ctx, &span); - for (row=0; row