push/pop color table state (Eric Plante)
[mesa.git] / src / mesa / swrast / s_alphabuf.c
index 4bf3368cb28daa18f91762eb9f1587d3a20d37ce..0c82055721c6f49c34895c64164cede6ebf72da7 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id: s_alphabuf.c,v 1.13 2002/10/11 17:41:06 brianp Exp $ */
+/* $Id: s_alphabuf.c,v 1.16 2002/11/26 02:58:43 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.0.1
  *
  * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
  *
@@ -32,8 +32,9 @@
 
 
 #include "glheader.h"
+#include "colormac.h"
 #include "context.h"
-#include "mem.h"
+#include "imports.h"
 
 #include "s_context.h"
 #include "s_alphabuf.h"
@@ -103,9 +104,11 @@ _mesa_alloc_alpha_buffers( GLframebuffer *buffer )
 void
 _mesa_clear_alpha_buffers( GLcontext *ctx )
 {
-   const GLchan aclear = ctx->Color.ClearColor[3];
+   GLchan aclear;
    GLuint bufferBit;
 
+   CLAMPED_FLOAT_TO_CHAN(aclear, ctx->Color.ClearColor[3]);
+
    ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);
    ASSERT(ctx->Color.ColorMask[ACOMP]);