[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glBlendEquationEXT Subroutine

Purpose

Specifies the RGB color blend equation.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glBlendEquationEXT(GLenum mode)

Parameters

mode Specifies how source and destination RGBA color components are combined. The symbolic constants GL_FUNC_ADD_EXT, GL_MIN_EXT, GL_MAX_EXT, GL_FUNC_SUBTRACT_EXT, GL_REVERSE_SUBTRACT_EXT are accepted. The initial mode is GL_FUNC_ADD_EXT.

Description

Blending combines corresponding source and destination color components according to the blending operation specified by the mode. The blend equations are:

GL_FUNC_ADD_EXT min(Cs*sf + Cd*df, 1)
GL_FUNC_SUBTRACT_EXT max(Cs*sf - Cd*df, 0)
GL_FUNC_REVERSE_SUBTRACT_EXT max(Cd*df - Cs*sf, 0)
GL_LOGIC_OP Cs Lop Cd
GL_MIN_EXT min(Cs, Cd)
GL_MAX_EXT max(Cs, Cd)

where Cs and Cd are the source and destination color components, respectively; sf and df are the source and destination blending factors are specified by glBlendFunc; Lop is one of the 16 bitwise operators specified by glLogicOp.

Notes

The modes GL_FUNC_SUBTRACT_EXT and GL_FUNC_REVERSE_SUBTRACT_EXT is part of the EXT_blend_subtract extension, not part of the core GL command set. If GL_EXT_blend_subtract is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension EXT_blend_subtract is supported by the connection.

The modes GL_LOGIC_OP is part of the EXT_blend_logic_op extension, not part of the core GL command set. If GL_EXT_blend_logic_op is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension EXT_blend_logic_op is supported by the connection.

EXT_blend_logic_op is supported by the connection.

The modes GL_MIN_EXT and GL_MAX_EXT is part of the EXT_blend_minmax extension, not part of the core GL command set. If GL_EXT_blend_minmax is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension EXT_blend_minmax is supported by the connection.

Errors

GL_INVALID_ENUM The mode parameter is not an accepted or supported value.
GL_INVALID_OPERATION The glBlendEquation is called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

glGet with argument GL_BLEND_EQUATION_EXT.

Related Information

The glBlendFunc subroutine, glEnable or glDisable subroutine, glGet subroutine, glLogicOp subroutine.


[ Previous | Next | Contents | Glossary | Home | Search ]