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 | |
parent | eac57f009ea347cfce0d70452c1bdeb0e6c9eeae (diff) |
More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 48 | ||||
-rw-r--r-- | src/mesa/drivers/x11/fakeglx.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xfonts.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 7 |
4 files changed, 33 insertions, 32 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)) diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index 4e5d5acd49b..d3a36ec8f43 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -1,4 +1,4 @@ -/* $Id: fakeglx.c,v 1.46 2001/02/17 00:17:31 brianp Exp $ */ +/* $Id: fakeglx.c,v 1.47 2001/03/08 15:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2206,7 +2206,7 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void) /* be sure our dispatch table size <= libGL's table */ { - int size = sizeof(struct _glxapi_table) / sizeof(void *); + GLuint size = sizeof(struct _glxapi_table) / sizeof(void *); (void) size; assert(_glxapi_get_dispatch_table_size() >= size); } diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c index 3bb27a0c536..22f941a490f 100644 --- a/src/mesa/drivers/x11/xfonts.c +++ b/src/mesa/drivers/x11/xfonts.c @@ -1,4 +1,4 @@ -/* $Id: xfonts.c,v 1.12 2001/03/03 20:33:30 brianp Exp $ */ +/* $Id: xfonts.c,v 1.13 2001/03/08 15:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -180,10 +180,10 @@ fill_bitmap (Display *dpy, Window win, GC gc, * determine if a given glyph is valid and return the * corresponding XCharStruct. */ -static XCharStruct *isvalid(XFontStruct *fs, int which) +static XCharStruct *isvalid(XFontStruct *fs, unsigned int which) { unsigned int rows,pages; - int byte1 = 0,byte2 = 0; + unsigned int byte1 = 0,byte2 = 0; int i,valid = 1; rows = fs->max_byte1 - fs->min_byte1 + 1; diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 8e1bd87517e..abbec2d7dd1 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.17 2001/03/03 20:33:30 brianp Exp $ */ +/* $Id: xm_api.c,v 1.18 2001/03/08 15:23:46 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -2237,7 +2237,8 @@ GLboolean XMesaSetFXmode( GLint mode ) static void FXgetImage( XMesaBuffer b ) { static unsigned short pixbuf[MAX_WIDTH]; - int x, y; + GLuint x, y; + int xpos, ypos; XMesaWindow root; unsigned int bw, depth, width, height; XMesaContext xmesa = (XMesaContext) b->xm_context->gl_ctx->DriverCtx; @@ -2252,7 +2253,7 @@ static void FXgetImage( XMesaBuffer b ) depth = b->frontbuffer->depth; #else XGetGeometry( xmesa->xm_visual->display, b->frontbuffer, - &root, &x, &y, &width, &height, &bw, &depth); + &root, &xpos, &ypos, &width, &height, &bw, &depth); #endif if (b->width != width || b->height != height) { b->width = MIN2((int)width, xmesa->xm_buffer->FXctx->width); |