GL_APICALL void GL_APIENTRY glBlendEquation(
GLenum mode
);
| Name | Description | |
|---|---|---|
| in | mode | Blend function |
Sets the blend function. The same function is set for the RGB and alpha components.
You can set mode to GL_MIN or GL_MAX in addition to GL_FUNC_ADD, GL_FUNC_SUBTRACT, and GL_FUNC_REVERSE_SUBTRACT from the OpenGL ES 2.0 standard.
Given Cs as the product of the source color and source factor and Cd as the product of the destination color and destination factor, the color Cr for the blend result is calculated as follows for each setting.
| GL_FUNC_ADD | Cr = Cs + Cd |
|---|---|
| GL_FUNC_SUBTRACT | Cr = Cs - Cd |
| GL_FUNC_REVERSE_SUBTRACT | Cr = Cd - Cs |
| GL_MIN | Cr = Cs < Cd ? Cs : Cd |
| GL_MAX | Cr = Cs > Cd ? Cs : Cd |
This function generates the following errors.
| GL_INVALID_OPERATION | This function was called without any command-list objects bound. |
|---|---|
| GL_INVALID_ENUM | The mode argument was set to an invalid value. |
CONFIDENTIAL