From 74b493a5e61237de081a438e774e5d8139d4c6b7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 24 Jan 2001 00:04:58 +0000 Subject: Lots of GLchan datatype changes. Added GLvector4us datatype in math/m_vector.[ch] Added _math_trans_4us() in math/m_translate.[ch] Choose GLvector4ub, GLvector4us, GLvector4f at compile time based on CHAN_BITS. Made Driver.ClearColor() and Driver.ClearIndex() optional driver functions. Changed args to Driver.ClearColor(), updated drivers. Reordered files in Makefile.X11 --- src/mesa/drivers/svga/svgamesa15.c | 8 +++----- src/mesa/drivers/svga/svgamesa15.h | 4 ++-- src/mesa/drivers/svga/svgamesa16.c | 10 +++++----- src/mesa/drivers/svga/svgamesa16.h | 4 ++-- src/mesa/drivers/svga/svgamesa24.c | 12 +++++------- src/mesa/drivers/svga/svgamesa24.h | 4 ++-- src/mesa/drivers/svga/svgamesa32.c | 8 +++----- src/mesa/drivers/svga/svgamesa32.h | 4 ++-- 8 files changed, 24 insertions(+), 30 deletions(-) (limited to 'src/mesa/drivers/svga') diff --git a/src/mesa/drivers/svga/svgamesa15.c b/src/mesa/drivers/svga/svgamesa15.c index 3332503d2b..0f8ebd330b 100644 --- a/src/mesa/drivers/svga/svgamesa15.c +++ b/src/mesa/drivers/svga/svgamesa15.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa15.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa15.c,v 1.8 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -54,11 +54,9 @@ static unsigned long __svga_getpixel15(int x, int y) return shortBuffer[offset]; } -void __clear_color15( GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) +void __clear_color15( GLcontext *ctx, const GLchan color[4] ) { - SVGAMesa->clear_hicolor=(red>>3)<<10 | (green>>3)<<5 | (blue>>3); + SVGAMesa->clear_hicolor=(color[0]>>3)<<10 | (color[1]>>3)<<5 | (color[2]>>3); /* SVGAMesa->clear_hicolor=(red)<<10 | (green)<<5 | (blue);*/ } diff --git a/src/mesa/drivers/svga/svgamesa15.h b/src/mesa/drivers/svga/svgamesa15.h index 83591a610f..f2c16d9f83 100644 --- a/src/mesa/drivers/svga/svgamesa15.h +++ b/src/mesa/drivers/svga/svgamesa15.h @@ -1,4 +1,4 @@ -/* $Id: svgamesa15.h,v 1.4 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa15.h,v 1.5 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #ifndef SVGA_MESA_15_H #define SVGA_MESA_15_H -extern void __clear_color15( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); +extern void __clear_color15( GLcontext *ctx, const GLchan color[4] ); extern GLbitfield __clear15( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); extern void __write_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); extern void __write_mono_rgba_span15( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]); diff --git a/src/mesa/drivers/svga/svgamesa16.c b/src/mesa/drivers/svga/svgamesa16.c index 02d1251665..20d1ed6fec 100644 --- a/src/mesa/drivers/svga/svgamesa16.c +++ b/src/mesa/drivers/svga/svgamesa16.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa16.c,v 1.7 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa16.c,v 1.8 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -56,11 +56,11 @@ static unsigned long __svga_getpixel16(int x, int y) return shortBuffer[offset]; } -void __clear_color16( GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) +void __clear_color16( GLcontext *ctx, const GLchan color[4] ) { - SVGAMesa->clear_hicolor=(red>>3)<<11 | (green>>2)<<5 | (blue>>3); + SVGAMesa->clear_hicolor = (color[0] >> 3) << 11 | + (color[1] >> 2) << 5 | + (color[2] >> 3); /* SVGAMesa->clear_hicolor=(red)<<11 | (green)<<5 | (blue); */ } diff --git a/src/mesa/drivers/svga/svgamesa16.h b/src/mesa/drivers/svga/svgamesa16.h index 94ddcf3a19..f18d559cdb 100644 --- a/src/mesa/drivers/svga/svgamesa16.h +++ b/src/mesa/drivers/svga/svgamesa16.h @@ -1,4 +1,4 @@ -/* $Id: svgamesa16.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa16.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #ifndef SVGA_MESA_16_H #define SVGA_MESA_16_H -extern void __clear_color16( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); +extern void __clear_color16( GLcontext *ctx, const GLchan color[4] ); extern GLbitfield __clear16( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); extern void __write_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); extern void __write_mono_rgba_span16( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]); diff --git a/src/mesa/drivers/svga/svgamesa24.c b/src/mesa/drivers/svga/svgamesa24.c index aa174df4cc..0d0c8e74c8 100644 --- a/src/mesa/drivers/svga/svgamesa24.c +++ b/src/mesa/drivers/svga/svgamesa24.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa24.c,v 1.8 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa24.c,v 1.9 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -78,13 +78,11 @@ static unsigned long __svga_getpixel24(int x, int y) return rgbBuffer[offset].r<<16 | rgbBuffer[offset].g<<8 | rgbBuffer[offset].b; } -void __clear_color24( GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) +void __clear_color24( GLcontext *ctx, const GLchan color[4] ) { - SVGAMesa->clear_red = red; - SVGAMesa->clear_green = green; - SVGAMesa->clear_blue = blue; + SVGAMesa->clear_red = color[0]; + SVGAMesa->clear_green = color[1]; + SVGAMesa->clear_blue = color[2]; /* SVGAMesa->clear_truecolor = red<<16 | green<<8 | blue; */ } diff --git a/src/mesa/drivers/svga/svgamesa24.h b/src/mesa/drivers/svga/svgamesa24.h index dc9382034b..9707e993c3 100644 --- a/src/mesa/drivers/svga/svgamesa24.h +++ b/src/mesa/drivers/svga/svgamesa24.h @@ -1,4 +1,4 @@ -/* $Id: svgamesa24.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa24.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #ifndef SVGA_MESA_24_H #define SVGA_MESA_24_H -extern void __clear_color24( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); +extern void __clear_color24( GLcontext *ctx, const GLchan color[4] ); extern GLbitfield __clear24( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); extern void __write_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); extern void __write_mono_rgba_span24( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]); diff --git a/src/mesa/drivers/svga/svgamesa32.c b/src/mesa/drivers/svga/svgamesa32.c index a56afdc86c..88907c49c8 100644 --- a/src/mesa/drivers/svga/svgamesa32.c +++ b/src/mesa/drivers/svga/svgamesa32.c @@ -1,4 +1,4 @@ -/* $Id: svgamesa32.c,v 1.8 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa32.c,v 1.9 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -74,11 +74,9 @@ static unsigned long __svga_getpixel32(int x, int y) return intBuffer[offset]; } -void __clear_color32( GLcontext *ctx, - GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ) +void __clear_color32( GLcontext *ctx, const GLchan color[4] ) { - SVGAMesa->clear_truecolor = red<<16 | green<<8 | blue; + SVGAMesa->clear_truecolor = (color[0] << 16) | (color[1] << 8) | color[2]; } GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all, diff --git a/src/mesa/drivers/svga/svgamesa32.h b/src/mesa/drivers/svga/svgamesa32.h index 3640624972..d24b95a6cd 100644 --- a/src/mesa/drivers/svga/svgamesa32.h +++ b/src/mesa/drivers/svga/svgamesa32.h @@ -1,4 +1,4 @@ -/* $Id: svgamesa32.h,v 1.3 2000/11/14 17:40:14 brianp Exp $ */ +/* $Id: svgamesa32.h,v 1.4 2001/01/24 00:04:59 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,7 @@ #ifndef SVGA_MESA_32_H #define SVGA_MESA_32_H -extern void __clear_color32( GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha ); +extern void __clear_color32( GLcontext *ctx, const GLchan color[4] ); extern GLbitfield __clear32( GLcontext *ctx, GLbitfield mask, GLboolean all, GLint x, GLint y, GLint width, GLint height ); extern void __write_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[] ); extern void __write_mono_rgba_span32( const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLchan color[4], const GLubyte mask[]); -- cgit v1.2.3