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/svga/svgamesa15.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/mesa/drivers/svga/svgamesa15.c') diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c index 28cd7a4264..3332503d2b 100644 --- a/src/mesa/drivers/svga/svgamesa15.c +++ b/src/mesa/drivers/svga/svgamesa15.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa15.c,v 1.6 2000/06/14 21:59:07 brianp Exp $ */ +/* $Id: svgamesa15.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -54,14 +54,6 @@ static unsigned long __svga_getpixel15(int x, int y) return shortBuffer[offset]; } -void __set_color15( GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) -{ - SVGAMesa->hicolor=(red>>3)<<10 | (green>>3)<<5 | (blue>>3); -/* SVGAMesa->hicolor=(red)<<10 | (green)<<5 | (blue); */ -} - void __clear_color15( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ) @@ -134,12 +126,15 @@ void __write_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, void __write_mono_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, - const GLubyte mask[]) + const GLchan color[4], const GLubyte mask[]) { + GLushort hicolor = (color[RCOMP] >> 3) << 10 | + (color[GCOMP] >> 3) << 5 | + (color[BCOMP] >> 3); int i; for (i=0; ihicolor); + __svga_drawpixel15( x, y, hicolor); } } } @@ -174,13 +169,16 @@ void __write_rgba_pixels15( const GLcontext *ctx, void __write_mono_rgba_pixels15( const GLcontext *ctx, GLuint n, const GLint x[], const GLint y[], - const GLubyte mask[] ) + const GLchan color[4], const GLubyte mask[] ) { + GLushort hicolor = (color[RCOMP] >> 3) << 10 | + (color[GCOMP] >> 3) << 5 | + (color[BCOMP] >> 3); int i; /* use current rgb color */ for (i=0; ihicolor ); + __svga_drawpixel15( x[i], y[i], hicolor ); } } } -- cgit v1.2.3