/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
ctx->Color.BlendEquationRGB = mode;
ctx->Color.BlendEquationA = mode;
- /* This is needed to support 1.1's RGB logic ops AND
- * 1.0's blending logicops.
- */
- ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled ||
- (ctx->Color.BlendEnabled &&
- mode == GL_LOGIC_OP));
-
if (ctx->Driver.BlendEquationSeparate)
(*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode );
}
ctx->Color.BlendEquationRGB = modeRGB;
ctx->Color.BlendEquationA = modeA;
- /* This is needed to support 1.1's RGB logic ops AND
- * 1.0's blending logicops. This test is simplified over glBlendEquation
- * because modeRGB cannot be GL_LOGIC_OP.
- */
- ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled);
-
if (ctx->Driver.BlendEquationSeparate)
(*ctx->Driver.BlendEquationSeparate)( ctx, modeRGB, modeA );
}
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.BlendEnabled = state;
- /* This is needed to support 1.1's RGB logic ops AND
- * 1.0's blending logicops.
- */
- ctx->Color._LogicOpEnabled =
- (ctx->Color.ColorLogicOpEnabled ||
- (state && ctx->Color.BlendEquationRGB == GL_LOGIC_OP));
break;
#if FEATURE_userclip
case GL_CLIP_PLANE0:
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ColorLogicOpEnabled = state;
- /* This is needed to support 1.1's RGB logic ops AND
- * 1.0's blending logicops.
- */
- ctx->Color._LogicOpEnabled =
- (state || (ctx->Color.BlendEnabled &&
- ctx->Color.BlendEquationRGB == GL_LOGIC_OP));
break;
case GL_MAP1_COLOR_4:
if (ctx->Eval.Map1Color4 == state)
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
}
+/**
+ * Update derived color/blend/logicop state.
+ */
+static void
+update_color(GLcontext *ctx)
+{
+ /* This is needed to support 1.1's RGB logic ops AND
+ * 1.0's blending logicops.
+ */
+ ctx->Color._LogicOpEnabled = (ctx->Color.ColorLogicOpEnabled ||
+ (ctx->Color.BlendEnabled &&
+ ctx->Color.BlendEquationRGB == GL_LOGIC_OP));
+}
+
/**
* If __GLcontextRec::NewState is non-zero then this function \b must be called
if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT))
update_viewport_matrix(ctx);
+ if (new_state & _NEW_COLOR)
+ update_color( ctx );
+
if (ctx->_MaintainTexEnvProgram) {
if (new_state & (_NEW_TEXTURE | _DD_NEW_SEPARATE_SPECULAR | _NEW_FOG))
_mesa_UpdateTexEnvProgram(ctx);