/* Set the buffer used for drawing */
/* XXX support for separate read/draw buffers hasn't been tested */
-static GLboolean fxDDSetDrawBuffer(GLcontext *ctx, GLenum mode )
+static GLboolean fxDDSetDrawBuffer(GLcontext *ctx, GLenum mode)
{
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
FX_grRenderBuffer(fxMesa->currentFB);
return GL_TRUE;
}
+ else if (mode == GL_NONE) {
+ FX_grColorMask(FXFALSE,FXFALSE);
+ return GL_TRUE;
+ }
else {
return GL_FALSE;
}
if (!ctx->Hint.AllowDrawMem)
return GL_TRUE; /* you'll take it and like it */
- if((ctx->RasterMask & STENCIL_BIT) ||
+ if((ctx->RasterMask & (STENCIL_BIT | MULTI_DRAW_BIT)) ||
((ctx->Color.BlendEnabled) && (ctx->Color.BlendEquation!=GL_FUNC_ADD_EXT)) ||
((ctx->Color.ColorLogicOpEnabled) && (ctx->Color.LogicOp!=GL_COPY)) ||
(ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) ||
{
fxMesaContext fxMesa = FX_CONTEXT(ctx);
- FX_grColorMask(ctx->Color.ColorMask[RCOMP] ||
- ctx->Color.ColorMask[GCOMP] ||
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
+ if (ctx->Color.DrawBuffer == GL_NONE) {
+ FX_grColorMask(FXFALSE, FXFALSE);
+ }
+ else {
+ FX_grColorMask(ctx->Color.ColorMask[RCOMP] ||
+ ctx->Color.ColorMask[GCOMP] ||
+ ctx->Color.ColorMask[BCOMP],
+ ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
+ }
}
+
/************************************************************************/
/**************************** Fog Mode SetUp ****************************/
/************************************************************************/