-/* $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
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 );
}