Contents / Previous / Next


Blending Equation

void glBlendEquation(GLenum mode)

Blending combines corresponding source and destination color components according to the blending operation specified by the mode. The blend equations are:

GL_FUNC_ADD min(Cs*sf + Cd*df, 1)
GL_FUNC_SUBTRACT max(Cs*sf - Cd*df, 0)
GL_FUNC_REVERSE_SUBTRACT max(Cd*df - Cs*sf, 0)
GL_LOGIC_OP Cs Lop Cd
GL_MIN min(Cs, Cd)
GL_MAX max(Cs, Cd)

where Cs and Cd are the source and destination color components, respectively; sf and df are the source and destination blending factors are specified by glBlendFunc; Lop is one of the 16 bitwise operators specified by glLogicOp.