new RGBA_LOGICOP_ENABLED() macro
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 17:49:47 +0000 (17:49 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 17:49:47 +0000 (17:49 +0000)
src/mesa/main/context.h
src/mesa/main/state.c

index c72fe8a56acd977b0622481a2f32d1f601671f9e..e7e0fda72ead811d259d178b2741ae337961dd78 100644 (file)
@@ -317,4 +317,12 @@ do {                                                                       \
    )
 
 
+/**
+ * Is RGBA LogicOp enabled?
+ */
+#define RGBA_LOGICOP_ENABLED(CTX) \
+  ((CTX)->Color.ColorLogicOpEnabled || \
+   ((CTX)->Color.BlendEnabled && (CTX)->Color.BlendEquationRGB == GL_LOGIC_OP))
+
+
 #endif /* CONTEXT_H */
index 1ced2a081e5ff794456d7b5d6a2882100dc355d1..de513926de5b61174d86d6b67eb9bfa3776ce4de 100644 (file)
@@ -983,9 +983,7 @@ 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));
+   ctx->Color._LogicOpEnabled = RGBA_LOGICOP_ENABLED(ctx);
 }