summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/svga/svgamesa16.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/svga/svgamesa16.c')
-rw-r--r--src/mesa/drivers/svga/svgamesa16.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/mesa/drivers/svga/svgamesa16.c b/src/mesa/drivers/svga/svgamesa16.c
index 817d4bb606d..02d1251665f 100644
--- a/src/mesa/drivers/svga/svgamesa16.c
+++ b/src/mesa/drivers/svga/svgamesa16.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa16.c,v 1.6 2000/06/14 21:59:07 brianp Exp $ */
+/* $Id: svgamesa16.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -56,14 +56,6 @@ static unsigned long __svga_getpixel16(int x, int y)
return shortBuffer[offset];
}
-void __set_color16( GLcontext *ctx,
- GLubyte red, GLubyte green,
- GLubyte blue, GLubyte alpha )
-{
- SVGAMesa->hicolor=(red>>3)<<11 | (green>>2)<<5 | (blue>>3);
-/* SVGAMesa->hicolor=(red)<<11 | (green)<<5 | (blue); */
-}
-
void __clear_color16( GLcontext *ctx,
GLubyte red, GLubyte green,
GLubyte blue, GLubyte alpha )
@@ -136,12 +128,13 @@ void __write_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y,
void __write_mono_rgba_span16( const GLcontext *ctx,
GLuint n, GLint x, GLint y,
- const GLubyte mask[])
+ const GLchan color[4], const GLubyte mask[])
{
+ GLushort hicolor=(color[RCOMP]>>3)<<11 | (color[GCOMP]>>2)<<5 | (color[BCOMP]>>3);
int i;
for (i=0; i<n; i++, x++) {
if (mask[i]) {
- __svga_drawpixel16( x, y, SVGAMesa->hicolor);
+ __svga_drawpixel16( x, y, hicolor);
}
}
}
@@ -176,13 +169,13 @@ void __write_rgba_pixels16( const GLcontext *ctx,
void __write_mono_rgba_pixels16( 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)<<11 | (color[GCOMP]>>2)<<5 | (color[BCOMP]>>3);
int i;
- /* use current rgb color */
for (i=0; i<n; i++) {
if (mask[i]) {
- __svga_drawpixel16( x[i], y[i], SVGAMesa->hicolor );
+ __svga_drawpixel16( x[i], y[i], hicolor );
}
}
}