-/* $Id: osmesa.c,v 1.69 2001/09/21 21:32:14 kschultz Exp $ */
+/* $Id: osmesa.c,v 1.70 2001/09/23 21:17:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
alphaBits = CHAN_BITS;
- rind = 2;
- gind = 1;
bind = 0;
+ gind = 1;
+ rind = 2;
aind = 3;
if (little_endian) {
- ashift = 0;
- rshift = 8;
- gshift = 16;
- bshift = 24;
+ bshift = 0;
+ gshift = 8;
+ rshift = 16;
+ ashift = 24;
}
else {
bshift = 24;
greenBits = CHAN_BITS;
blueBits = CHAN_BITS;
alphaBits = CHAN_BITS;
+ aind = 0;
rind = 1;
gind = 2;
bind = 3;
- aind = 0;
if (little_endian) {
- bshift = 0;
- gshift = 8;
- rshift = 16;
- ashift = 24;
+ ashift = 0;
+ rshift = 8;
+ gshift = 16;
+ bshift = 24;
}
else {
ashift = 24;
*ptr4 = pixel; \
}
+#if 0 /* XXX use this in the future */
+#define PLOT(X,Y) \
+ { \
+ GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \
+ pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \
+ pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \
+ pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \
+ pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \
+ }
+#endif
+
#ifdef WIN32
#include "..\swrast\s_linetemp.h"
#else
/*
* Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer.
+ * But don't write to Z buffer.
* XXX update for GLchan
*/
static void
*ptr4 = pixel; \
}
+#if 0 /* XXX use this in the future */
+#define PLOT(X,Y) \
+ if (Z < *zPtr) { \
+ GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \
+ pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \
+ pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \
+ pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \
+ pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \
+ }
+#endif
+
#ifdef WIN32
#include "..\swrast\s_linetemp.h"
#else
*zPtr = Z; \
}
+#if 0 /* XXX use this in the future */
+#define PLOT(X,Y) \
+ if (Z < *zPtr) { \
+ GLchan *pixel = (GLchan *) PIXELADDR4(X, Y); \
+ pixel[rInd] = (pixel[rInd] * msavalue + rvalue) >> CHAN_BITS; \
+ pixel[gInd] = (pixel[gInd] * msavalue + gvalue) >> CHAN_BITS; \
+ pixel[bInd] = (pixel[bInd] * msavalue + bvalue) >> CHAN_BITS; \
+ pixel[aInd] = (pixel[aInd] * msavalue + avalue) >> CHAN_BITS; \
+ *zPtr = Z; \
+ }
+#endif
+
#ifdef WIN32
#include "..\swrast\s_linetemp.h"
#else