From fc80ad6e62fb2b53d53756593099330477a44c52 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 4 Oct 2002 19:10:06 +0000 Subject: Changed a number of context fields from GLchan to GLfloat (such as ClearColor). Also changed parameter types for some driver functions (like ctx->Driver.Clear- Color). Updated all the device drivers. Someday, we want to support 8, 16 and 32-bit channels dynamically at runtime. --- src/mesa/swrast/s_alpha.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/swrast/s_alpha.c') diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 79e27d5755..5cbfe8617a 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.11 2002/08/07 00:45:07 brianp Exp $ */ +/* $Id: s_alpha.c,v 1.12 2002/10/04 19:10:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -50,11 +50,13 @@ GLint _mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ) { const GLchan (*rgba)[4] = (const GLchan (*)[4]) span->array->rgba; - const GLchan ref = ctx->Color.AlphaRef; + GLchan ref; const GLuint n = span->end; GLubyte *mask = span->array->mask; GLuint i; + CLAMPED_FLOAT_TO_CHAN(ref, ctx->Color.AlphaRef); + if (span->arrayMask & SPAN_RGBA) { /* Use the array values */ switch (ctx->Color.AlphaFunc) { -- cgit v1.2.3