summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/svga/svgamesa15.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-14 17:40:13 +0000
committerBrian Paul <[email protected]>2000-11-14 17:40:13 +0000
commitc19d783e0715ac01ad4d3fd0705500d2bf6f7039 (patch)
tree68e28470e87358b225e07477a4900d79f8e47b0b /src/mesa/drivers/svga/svgamesa15.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/svga/svgamesa15.c')
-rw-r--r--src/mesa/drivers/svga/svgamesa15.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c
index 28cd7a42642..3332503d2b8 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; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel15( x, y, SVGAMesa->hicolor);
+ __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; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel15( x[i], y[i], SVGAMesa->hicolor );
+ __svga_drawpixel15( x[i], y[i], hicolor );
}
}
}