-/* $Id: xm_span.c,v 1.6 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: xm_span.c,v 1.7 2001/01/29 22:40:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
register GLuint i;
register GLushort *ptr = PIXELADDR2( xmesa->xm_buffer, x, y );
+ const GLint y2 = FLIP(xmesa->xm_buffer, y);
if (mask) {
for (i=0;i<n;i++,x++) {
if (mask[i]) {
- PACK_TRUEDITHER( ptr[i], x, y, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] );
+ PACK_TRUEDITHER( ptr[i], x, y2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] );
}
}
}
n -= extraPixel;
for (i = 0; i < n; i += 2, x += 2) {
GLuint p0, p1;
- PACK_TRUEDITHER( p0, x, y, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] );
- PACK_TRUEDITHER( p1, x+1, y, rgba[i+1][RCOMP], rgba[i+1][GCOMP], rgba[i+1][BCOMP] );
+ PACK_TRUEDITHER( p0, x, y2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP] );
+ PACK_TRUEDITHER( p1, x+1, y2, rgba[i+1][RCOMP], rgba[i+1][GCOMP], rgba[i+1][BCOMP] );
*ptr32++ = (p1 << 16) | p0;
}
if (extraPixel) {
- PACK_TRUEDITHER( ptr[n], x+n, y, rgba[n][RCOMP], rgba[n][GCOMP], rgba[n][BCOMP]);
+ PACK_TRUEDITHER( ptr[n], x+n, y2, rgba[n][RCOMP], rgba[n][GCOMP], rgba[n][BCOMP]);
}
#else
for (i = 0; i < n; i++, x++) {
- PACK_TRUEDITHER( ptr[i], x, y, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]);
+ PACK_TRUEDITHER( ptr[i], x, y2, rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP]);
}
#endif
}