summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/accum.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-10-28 18:34:48 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-10-28 18:34:48 +0000
commitba643a2094a1e844b6ce60f468057057557859ce (patch)
tree27309b7362369d7339290f3702f4b7179be4c690 /src/mesa/main/accum.c
parenta897b335bec7465ab688ef369c75b468b7251b05 (diff)
downloadexternal_mesa3d-ba643a2094a1e844b6ce60f468057057557859ce.zip
external_mesa3d-ba643a2094a1e844b6ce60f468057057557859ce.tar.gz
external_mesa3d-ba643a2094a1e844b6ce60f468057057557859ce.tar.bz2
Basic work to support deep color channels:
Replace GLubyte with GLchan Replace 255 with CHAN_MAX
Diffstat (limited to 'src/mesa/main/accum.c')
-rw-r--r--src/mesa/main/accum.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 13d7ace..43cf757 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,4 +1,4 @@
-/* $Id: accum.c,v 1.27 2000/10/17 00:42:02 brianp Exp $ */
+/* $Id: accum.c,v 1.28 2000/10/28 18:34:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -63,7 +63,9 @@
*/
+#if CHAN_BITS == 8
#define USE_OPTIMIZED_ACCUM /* enable the optimization */
+#endif
@@ -139,7 +141,7 @@ _mesa_Accum( GLenum op, GLfloat value )
GET_CURRENT_CONTEXT(ctx);
GLuint xpos, ypos, width, height, width4;
GLfloat acc_scale;
- GLubyte rgba[MAX_WIDTH][4];
+ GLchan rgba[MAX_WIDTH][4];
const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
const GLint iChanMax = (1 << (sizeof(GLchan) * 8)) - 1;
const GLfloat fChanMax = (1 << (sizeof(GLchan) * 8)) - 1;
@@ -387,7 +389,7 @@ _mesa_Accum( GLenum op, GLfloat value )
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
}
(*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
- (const GLubyte (*)[4])rgba, NULL );
+ (const GLchan (*)[4])rgba, NULL );
ypos++;
}
}
@@ -414,7 +416,7 @@ _mesa_Accum( GLenum op, GLfloat value )
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
}
(*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
- (const GLubyte (*)[4])rgba, NULL );
+ (const GLchan (*)[4])rgba, NULL );
ypos++;
}
}