From c19d783e0715ac01ad4d3fd0705500d2bf6f7039 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 14 Nov 2000 17:40:13 +0000 Subject: 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. --- src/mesa/drivers/glide/fxdd.c | 2 ++ src/mesa/drivers/glide/fxddspan.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mesa/drivers/glide') diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 24dd9946a3..e70be6cd6b 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -981,8 +981,10 @@ void fxSetupDDPointers(GLcontext *ctx) ctx->Driver.ClearColor=fxDDClearColor; ctx->Driver.Clear=fxDDClear; +#if 0 ctx->Driver.Index=NULL; ctx->Driver.Color=fxDDSetColor; +#endif ctx->Driver.SetDrawBuffer=fxDDSetDrawBuffer; ctx->Driver.SetReadBuffer=fxDDSetReadBuffer; 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;icolor; + 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;icolor; + 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;icurrentFB,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); } -- cgit v1.2.3