Next | Prev | Up | Top | Contents | Index

The Logical Operation Blending Extension

The logical operation blending extension, EXT_blend_logic_op, specifies a single additional blending equation, using the glBlendEquationEXT() call discussed in "The Minmax Blending Extension". The blending equation is a logical combination of the source and destination colors. The specific logical operation is specified by glLogicOp(), which is discussed in the section "Logical Operations" in Chapter 10, "The Framebuffer" of the OpenGL Programming Guide.

A possible application of this extension is for annotations, for example, assume you want to annotate a map without redrawing the map itself. To make the annotations visible, XOR them with the map to make them disappear again, XOR them once more. You should XOR the most significant bit of the color.

If you call glBlendEquationEXT() with mode set to GL_LOGIC_OP, the blending equation becomes

C = Cs OP Cd
Cs and Cd are the source and destination colors, and OP is the logic operation as specified by glLogicOp(). The value of the boolean parameter GL_LOGIC_OP, specified by glEnable() and glDisable(), has no effect on blending.


Next | Prev | Up | Top | Contents | Index