Specifies the RGB color blend equation. This subroutine is part of the OpenGL 1.2 ARB Imaging subset.
OpenGL C bindings library: libGL.a
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.
The mode GL_LOGIC_OP is part of the EXT_blend_logic_op extension, not part of the core GL command set. If GL_EXT_blend_logic_op is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension EXT_blend_logic_op is supported by the connection.
GL_INVALID_ENUM | The mode parameter is not an accepted or supported value. |
GL_INVALID_OPERATION | The glBlendEquation is called between a call to glBegin and the corresponding call to glEnd. |
glGet with argument GL_BLEND_EQUATION.
The glBlendFunc subroutine, glEnable or glDisable subroutine, glGet subroutine, glLogicOp subroutine.