summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxddspan.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-11-14 17:40:13 +0000
commitc19d783e0715ac01ad4d3fd0705500d2bf6f7039 (patch)
tree68e28470e87358b225e07477a4900d79f8e47b0b /src/mesa/drivers/glide/fxddspan.c
parent1e1aac034c986a08248861363c0baa27dc2ae2d5 (diff)
Removed Driver.Color() and Driver.Index() functions.
Pass color or color index directly to WriteMono*() span functions. Updated current s/w drivers accordingly. Clean-up of X gc handling in XMesa driver.
Diffstat (limited to 'src/mesa/drivers/glide/fxddspan.c')
-rw-r--r--src/mesa/drivers/glide/fxddspan.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c
index 1c195000a7..7eb8591ae6 100644
--- a/src/mesa/drivers/glide/fxddspan.c
+++ b/src/mesa/drivers/glide/fxddspan.c
@@ -223,12 +223,13 @@ static void fxDDWriteRGBSpan(const GLcontext *ctx,
static void fxDDWriteMonoRGBASpan(const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
GLuint i;
GLint bottom=fxMesa->height-1;
GLuint data[MAX_WIDTH];
+ GrColor_t gColor = FXCOLOR4(color);
if (MESA_VERBOSE&VERBOSE_DRIVER) {
fprintf(stderr,"fxmesa: fxDDWriteMonoRGBASpan(...)\n");
@@ -239,7 +240,7 @@ static void fxDDWriteMonoRGBASpan(const GLcontext *ctx,
for (i=0;i<n;i++) {
if (mask[i]) {
- data[span] = (GLuint) fxMesa->color;
+ data[span] = (GLuint) gColor;
++span;
} else {
if (span > 0) {
@@ -257,7 +258,7 @@ static void fxDDWriteMonoRGBASpan(const GLcontext *ctx,
(void *) data );
} else {
for (i=0;i<n;i++) {
- data[i]=(GLuint) fxMesa->color;
+ data[i]=(GLuint) gColor;
}
writeRegionClipped(fxMesa, fxMesa->currentFB, x, bottom-y, GR_LFB_SRC_FMT_8888,
@@ -372,11 +373,12 @@ static void fxDDWriteRGBAPixels(const GLcontext *ctx,
static void fxDDWriteMonoRGBAPixels(const GLcontext *ctx,
GLuint n, const GLint x[], const GLint y[],
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
GLuint i;
GLint bottom=fxMesa->height-1;
+ GrColor_t gColor = FXCOLOR4(color);
if (MESA_VERBOSE&VERBOSE_DRIVER) {
fprintf(stderr,"fxmesa: fxDDWriteMonoRGBAPixels(...)\n");
@@ -385,7 +387,7 @@ static void fxDDWriteMonoRGBAPixels(const GLcontext *ctx,
for(i=0;i<n;i++)
if(mask[i])
writeRegionClipped(fxMesa, fxMesa->currentFB,x[i],bottom-y[i],
- GR_LFB_SRC_FMT_8888,1,1,0,(void *) &fxMesa->color);
+ GR_LFB_SRC_FMT_8888,1,1,0,(void *) &gColor);
}