summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_alpha.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-02-02 21:40:33 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-02-02 21:40:33 +0000
commitb37a084357dd08573b86d6d8c5ba43d65bdc1bd7 (patch)
treee9b71cecbc7500a5c6144c79cda6ac2a7a7e3558 /src/mesa/swrast/s_alpha.c
parent733a4b602bbbfda83ee03b7ae4f3737bbe659034 (diff)
Converted line drawing over to new span code, pb no longer used.
Big clean-up of line drawing code. Removed many obsolete span processing functions.
Diffstat (limited to 'src/mesa/swrast/s_alpha.c')
-rw-r--r--src/mesa/swrast/s_alpha.c63
1 files changed, 1 insertions, 62 deletions
diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c
index d44bdb63eb..914b699cea 100644
--- a/src/mesa/swrast/s_alpha.c
+++ b/src/mesa/swrast/s_alpha.c
@@ -1,4 +1,4 @@
-/* $Id: s_alpha.c,v 1.8 2002/01/31 00:27:43 brianp Exp $ */
+/* $Id: s_alpha.c,v 1.9 2002/02/02 21:40:33 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -218,64 +218,3 @@ _mesa_alpha_test( const GLcontext *ctx, struct sw_span *span )
else
return 1;
}
-
-
-/*
- * Apply the alpha test to a span of pixels.
- * In: rgba - array of pixels
- * In/Out: mask - current pixel mask. Pixels which fail the alpha test
- * will set the corresponding mask flag to 0.
- * Return: 0 = all pixels in the span failed the alpha test.
- * 1 = one or more pixels passed the alpha test.
- */
-GLint
-_old_alpha_test( const GLcontext *ctx,
- GLuint n, CONST GLchan rgba[][4], GLubyte mask[] )
-{
- GLuint i;
- const GLchan ref = ctx->Color.AlphaRef;
-
- /* switch cases ordered from most frequent to less frequent */
- switch (ctx->Color.AlphaFunc) {
- case GL_LESS:
- for (i=0;i<n;i++) {
- mask[i] &= (rgba[i][ACOMP] < ref);
- }
- return 1;
- case GL_LEQUAL:
- for (i=0;i<n;i++)
- mask[i] &= (rgba[i][ACOMP] <= ref);
- return 1;
- case GL_GEQUAL:
- for (i=0;i<n;i++) {
- mask[i] &= (rgba[i][ACOMP] >= ref);
- }
- return 1;
- case GL_GREATER:
- for (i=0;i<n;i++) {
- mask[i] &= (rgba[i][ACOMP] > ref);
- }
- return 1;
- case GL_NOTEQUAL:
- for (i=0;i<n;i++) {
- mask[i] &= (rgba[i][ACOMP] != ref);
- }
- return 1;
- case GL_EQUAL:
- for (i=0;i<n;i++) {
- mask[i] &= (rgba[i][ACOMP] == ref);
- }
- return 1;
- case GL_ALWAYS:
- /* do nothing */
- return 1;
- case GL_NEVER:
- /* caller should check for zero! */
- return 0;
- default:
- _mesa_problem( ctx, "Invalid alpha test in gl_alpha_test" );
- return 0;
- }
- /* Never get here */
- /*return 1;*/
-}