diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/x11/xm_dd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index 2bb04ae504..59c8e0cd79 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.19 2001/03/19 02:25:36 keithw Exp $ */ +/* $Id: xm_dd.c,v 1.20 2001/04/03 16:19:54 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -680,16 +680,16 @@ clear_32bit_ximage( GLcontext *ctx, GLboolean all, GLint x, GLint y, GLint width, GLint height ) { const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; - if (all) { - register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height; - register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data; - register GLuint pixel = (GLuint) xmesa->clearpixel; - if (xmesa->swapbytes) { - pixel = ((pixel >> 24) & 0x000000ff) + register GLuint pixel = (GLuint) xmesa->clearpixel; + if (xmesa->swapbytes) { + pixel = ((pixel >> 24) & 0x000000ff) | ((pixel >> 8) & 0x0000ff00) | ((pixel << 8) & 0x00ff0000) | ((pixel << 24) & 0xff000000); - } + } + if (all) { + register GLint n = xmesa->xm_buffer->width * xmesa->xm_buffer->height; + register GLuint *ptr4 = (GLuint *) xmesa->xm_buffer->backimage->data; if (pixel==0) { MEMSET( ptr4, pixel, 4*n ); } |