Browse Source

clear pixel value wasn't byteswapped for scissored clears in clear_32bit_ximage()

tags/mesa_3_5
Brian Paul 24 years ago
parent
commit
9d205e3542
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      src/mesa/drivers/x11/xm_dd.c

+ 8
- 8
src/mesa/drivers/x11/xm_dd.c View File

@@ -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 );
}

Loading…
Cancel
Save