GL_APICALL void GL_APIENTRY glBlendEquationSeparate(
GLenum modeRGB,
GLenum modeAlpha
);
| Name | Description | |
|---|---|---|
| in | modeRGB | Blend function for RGB components. |
| in | modeAlpha | Blend function for alpha components. |
Sets the blend function(s). This sets separate functions for the RGB and alpha components.
You can specify 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 blend factor and Cd as the product of the destination color and destination blend 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 modeRGB or modeAlpha argument was set to an invalid value. |
CONFIDENTIAL