glBlendEquation Function

Syntax

GL_APICALL void GL_APIENTRY glBlendEquation(
     GLenum mode
);

Arguments

Name Description
in mode Blend function

Return Values

No values are returned.

Description

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_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 mode argument was set to an invalid value.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL