mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
call _swrast_span_default_color() to simplify _swrast_Bitmap(), improved comments
This commit is contained in:
parent
da62bcecfb
commit
9b507639ab
1 changed files with 7 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue