glBlendEquationSeparate Function

Syntax

GL_APICALL void GL_APIENTRY glBlendEquationSeparate(
     GLenum modeRGB,
     GLenum modeAlpha
);

Parameters

Name Description
in modeRGB Blend function for RGB components.
in modeAlpha Blend function for alpha components.

Return Values

No values are returned.

Description

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_ADDCr = Cs + Cd
GL_FUNC_SUBTRACTCr = Cs - Cd
GL_FUNC_REVERSE_SUBTRACTCr = Cd - Cs
GL_MINCr = Cs < Cd ? Cs : Cd
GL_MAXCr = Cs > Cd ? Cs : Cd

This function generates the following errors.

GL_INVALID_OPERATIONThis function was called without any command-list objects bound.
GL_INVALID_ENUMThe modeRGB or modeAlpha argument was set to an invalid value.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL