diff options
author | Kendall Bennett <KendallB@scitechsoft.com> | 2003-10-08 01:53:30 +0000 |
---|---|---|
committer | Kendall Bennett <KendallB@scitechsoft.com> | 2003-10-08 01:53:30 +0000 |
commit | 2cdd699a77f7801b1e37b72108a33fa95354e67a (patch) | |
tree | 09e9862652847f7eeeb6258620fb2012c8e6e90c /src/mesa/drivers/osmesa | |
parent | 4e5b58f48382862922dbc387080bfb2378a43b47 (diff) |
More SciTech SNAP specific changes to glheader.h. Also modified the macros
in swrast/s_spantemp.h to allow dithering to be used in the SNAP drivers.
Diffstat (limited to 'src/mesa/drivers/osmesa')
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 396f9af6b0..4fd58f2027 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -226,20 +226,20 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, GLchan *P = osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 #if CHAN_TYPE == GL_FLOAT -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[0] = MAX2((R), 0.0F); \ P[1] = MAX2((G), 0.0F); \ P[2] = MAX2((B), 0.0F); \ P[3] = CHAN_MAXF -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[0] = MAX2((R), 0.0F); \ P[1] = MAX2((G), 0.0F); \ P[2] = MAX2((B), 0.0F); \ P[3] = CLAMP((A), 0.0F, CHAN_MAXF) #else -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[0] = R; P[1] = G; P[2] = B; P[3] = CHAN_MAX -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[0] = R; P[1] = G; P[2] = B; P[3] = A #endif #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ @@ -253,9 +253,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, #define INIT_PIXEL_PTR(P, X, Y) \ GLchan *P = osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[2] = R; P[1] = G; P[0] = B; P[3] = CHAN_MAX -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[2] = R; P[1] = G; P[0] = B; P[3] = A #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ R = P[2]; G = P[1]; B = P[0]; A = P[3] @@ -268,9 +268,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, #define INIT_PIXEL_PTR(P, X, Y) \ GLchan *P = osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[1] = R; P[2] = G; P[3] = B; P[0] = CHAN_MAX -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[1] = R; P[2] = G; P[3] = B; P[0] = A #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ R = P[1]; G = P[2]; B = P[3]; A = P[0] @@ -283,9 +283,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, #define INIT_PIXEL_PTR(P, X, Y) \ GLchan *P = osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[0] = R; P[1] = G; P[2] = B -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[0] = R; P[1] = G; P[2] = B #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ R = P[0]; G = P[1]; B = P[2]; A = CHAN_MAX @@ -298,9 +298,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, #define INIT_PIXEL_PTR(P, X, Y) \ GLchan *P = osmesa->rowaddr[Y] + 4 * (X) #define INC_PIXEL_PTR(P) P += 4 -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ P[0] = B; P[1] = G; P[2] = R -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ P[0] = B; P[1] = G; P[2] = R #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ B = P[0]; G = P[1]; R = P[2]; A = CHAN_MAX @@ -314,9 +314,9 @@ clear( GLcontext *ctx, GLbitfield mask, GLboolean all, #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *) osmesa->rowaddr[Y] + (X) #define INC_PIXEL_PTR(P) P += 1 -#define STORE_RGB_PIXEL(P, R, G, B) \ +#define STORE_RGB_PIXEL(P, X, Y, R, G, B) \ *P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) ) -#define STORE_RGBA_PIXEL(P, R, G, B, A) \ +#define STORE_RGBA_PIXEL(P, X, Y, R, G, B, A) \ *P = ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) ) #define FETCH_RGBA_PIXEL(R, G, B, A, P) \ R = ( (((*P) >> 8) & 0xf8) | (((*P) >> 11) & 0x7) ); \ |