From 9ac7182ec4558cb0c3a6481c72732f05feb50a60 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 15 Feb 2002 19:15:33 +0000 Subject: use separate GC for SwapBuffers to avoid colormask problem --- src/mesa/drivers/x11/xm_dd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/x11/xm_dd.c') diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c index db97f0754dc..2de711562bc 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.27 2002/02/14 00:40:24 brianp Exp $ */ +/* $Id: xm_dd.c,v 1.28 2002/02/15 19:15:33 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -267,6 +267,7 @@ index_mask( GLcontext *ctx, GLuint mask ) else { m = (unsigned long) mask; } + XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } @@ -281,8 +282,7 @@ color_mask(GLcontext *ctx, int xclass = GET_VISUAL_CLASS(xmesa->xm_visual); (void) amask; - if (xmesa->xm_buffer->buffer != XIMAGE - && (xclass == TrueColor || xclass == DirectColor)) { + if (xclass == TrueColor || xclass == DirectColor) { unsigned long m; if (rmask && gmask && bmask) { m = ((unsigned long)~0L); @@ -293,6 +293,7 @@ color_mask(GLcontext *ctx, if (gmask) m |= GET_GREENMASK(xmesa->xm_visual); if (bmask) m |= GET_BLUEMASK(xmesa->xm_visual); } + XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->gc, m ); XMesaSetPlaneMask( xmesa->display, xmesa->xm_buffer->cleargc, m ); } } -- cgit v1.2.3