GL_APICALL void GL_APIENTRY glBlendFuncSeparate(
GLenum srcRGB,
GLenum dstRGB,
GLenum srcAlpha,
GLenum dstAlpha
);
| Name | Description | |
|---|---|---|
| in | srcRGB | Source RGB components for the blend feature |
| in | dstRGB | Destination RGB components for the blend feature |
| in | srcAlpha | Source alpha components for the blend feature |
| in | dstAlpha | Destination alpha components for the blend feature |
Configures the source and destination blend factors for the blend feature. Values are set separately for the RGB and alpha components.
You can set srcRGB, dstRGB, srcAlpha, and dstAlpha to the following values. (You cannot set dstRGB or dstAlpha to GL_SRC_ALPHA_SATURATE with POD.)
In the table, (Fr,Fg,Fb,Fa) indicates the blend factors for each RGBA component, (Rs,Gs,Bs,As) indicates the input pixel color, (Rd,Gd,Bd,Ad) indicates the pixel color stored in the framebuffer, and (Rc,Gc,Bc,Ac) indicates the constant color set by glBlendColor.
| GL_ZERO | (Fr,Fg,Fb,Fa) = (0,0,0,0) |
|---|---|
| GL_ONE | (Fr,Fg,Fb,Fa) = (1,1,1,1) |
| GL_SRC_COLOR | (Fr,Fg,Fb,Fa) = (Rs,Gs,Bs,As) |
| GL_ONE_MINUS_SRC_COLOR | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rs,Gs,Bs,As) |
| GL_DST_COLOR | (Fr,Fg,Fb,Fa) = (Rd,Gd,Bd,Ad) |
| GL_ONE_MINUS_DST_COLOR | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rd,Gd,Bd,Ad) |
| GL_SRC_ALPHA | (Fr,Fg,Fb,Fa) = (As,As,As,As) |
| GL_ONE_MINUS_SRC_ALPHA | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (As,As,As,As) |
| GL_DST_ALPHA | (Fr,Fg,Fb,Fa) = (Ad,Ad,Ad,Ad) |
| GL_ONE_MINUS_DST_ALPHA | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ad,Ad,Ad,Ad) |
| GL_CONSTANT_COLOR | (Fr,Fg,Fb,Fa) = (Rc,Gc,Bc,Ac) |
| GL_ONE_MINUS_CONSTANT_COLOR | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (Rc,Gc,Bc,Ac) |
| GL_CONSTANT_ALPHA | (Fr,Fg,Fb,Fa) = (Ac,Ac,Ac,Ac) |
| GL_ONE_MINUS_CONSTANT_ALPHA | (Fr,Fg,Fb,Fa) = (1,1,1,1) - (Ac,Ac,Ac,Ac) |
| GL_SRC_ALPHA_SATURATE | (Fr,Fg,Fb,Fa) = (min(As,1-Ad),min(As,1-Ad),min(As,1-Ad),1) |
This function generates the following errors.
| GL_INVALID_ENUM | The srcRGB, dstRGB, srcAlpha, or dstAlpha argument was set to an invalid value. |
|---|
CONFIDENTIAL