From d89c87ac40631cb7c8c7da71c61770fc93903a33 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 1 Mar 2001 00:05:05 +0000 Subject: [PATCH] added s/w alpha buffer clearing --- src/mesa/drivers/x11/xm_dd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index bf0058cc41e..0d06860b644 100644 --- a/src/mesa/drivers/x11/xm_dd.c +++ b/src/mesa/drivers/x11/xm_dd.c @@ -1,4 +1,4 @@ -/* $Id: xm_dd.c,v 1.15 2001/02/19 20:01:42 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.16 2001/03/01 00:05:05 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -38,6 +38,7 @@ #include "xmesaP.h" #include "array_cache/acache.h" #include "swrast/swrast.h" +#include "swrast/s_alphabuf.h" #include "swrast_setup/swrast_setup.h" #include "tnl/tnl.h" @@ -748,6 +749,12 @@ clear_buffers( GLcontext *ctx, GLbitfield mask, const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask; + if ((mask & (DD_FRONT_LEFT_BIT | DD_FRONT_RIGHT_BIT)) && + xmesa->xm_buffer->gl_buffer->UseSoftwareAlphaBuffers && + ctx->Color.ColorMask[ACOMP]) { + _mesa_clear_alpha_buffers(ctx); + } + /* we can't handle color or index masking */ if (*colorMask == 0xffffffff && ctx->Color.IndexMask == 0xffffffff) { if (mask & DD_FRONT_LEFT_BIT) { -- 2.30.2