diff options
author | Brian Paul <[email protected]> | 2001-03-08 15:23:46 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-08 15:23:46 +0000 |
commit | 01915e90e6912f06d43d443a09157f7bbc96ddc5 (patch) | |
tree | fc86ff76a45027c01d45902bed894d12f161088c /src/mesa/drivers/osmesa/osmesa.c | |
parent | eac57f009ea347cfce0d70452c1bdeb0e6c9eeae (diff) |
More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work.
Diffstat (limited to 'src/mesa/drivers/osmesa/osmesa.c')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 6724c329fb3..5b3b9427807 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.48 2001/03/03 20:33:29 brianp Exp $ */ +/* $Id: osmesa.c,v 1.49 2001/03/08 15:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -145,10 +145,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, } else if (format==OSMESA_RGBA) { indexBits = 0; - redBits = 8; - greenBits = 8; - blueBits = 8; - alphaBits = 8; + redBits = CHAN_BITS; + greenBits = CHAN_BITS; + blueBits = CHAN_BITS; + alphaBits = CHAN_BITS; rind = 0; gind = 1; bind = 2; @@ -169,10 +169,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, } else if (format==OSMESA_BGRA) { indexBits = 0; - redBits = 8; - greenBits = 8; - blueBits = 8; - alphaBits = 8; + redBits = CHAN_BITS; + greenBits = CHAN_BITS; + blueBits = CHAN_BITS; + alphaBits = CHAN_BITS; rind = 2; gind = 1; bind = 0; @@ -193,10 +193,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, } else if (format==OSMESA_ARGB) { indexBits = 0; - redBits = 8; - greenBits = 8; - blueBits = 8; - alphaBits = 8; + redBits = CHAN_BITS; + greenBits = CHAN_BITS; + blueBits = CHAN_BITS; + alphaBits = CHAN_BITS; rind = 1; gind = 2; bind = 3; @@ -217,9 +217,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, } else if (format==OSMESA_RGB) { indexBits = 0; - redBits = 8; - greenBits = 8; - blueBits = 8; + redBits = CHAN_BITS; + greenBits = CHAN_BITS; + blueBits = CHAN_BITS; alphaBits = 0; bshift = 0; gshift = 8; @@ -233,9 +233,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, } else if (format==OSMESA_BGR) { indexBits = 0; - redBits = 8; - greenBits = 8; - blueBits = 8; + redBits = CHAN_BITS; + greenBits = CHAN_BITS; + blueBits = CHAN_BITS; alphaBits = 0; bshift = 0; gshift = 8; @@ -506,7 +506,7 @@ void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value ) *value = ctx->format; return; case OSMESA_TYPE: - *value = GL_UNSIGNED_BYTE; + *value = CHAN_TYPE; return; case OSMESA_ROW_LENGTH: *value = ctx->rowlength; @@ -611,10 +611,10 @@ do { \ } while (0) -#define UNPACK_RED(P) ( ((GLchan *) &(P))[osmesa->rInd] ) -#define UNPACK_GREEN(P) ( ((GLchan *) &(P))[osmesa->gInd] ) -#define UNPACK_BLUE(P) ( ((GLchan *) &(P))[osmesa->bInd] ) -#define UNPACK_ALPHA(P) ( ((GLchan *) &(P))[osmesa->aInd] ) +#define UNPACK_RED(P) ( (P)[osmesa->rInd] ) +#define UNPACK_GREEN(P) ( (P)[osmesa->gInd] ) +#define UNPACK_BLUE(P) ( (P)[osmesa->bInd] ) +#define UNPACK_ALPHA(P) ( (P)[osmesa->aInd] ) #define PIXELADDR1(X,Y) (osmesa->rowaddr[Y] + (X)) |