glLogicOp Function

Syntax

GL_APICALL void GL_APIENTRY glLogicOp(
     GLenum opcode
);

Parameters

Name Description
in opcode Logical operation mode

Return Values

No values are returned.

Description

Sets the logical operation for pixels.

You can set opcode to the following values. The input pixel color is indicated by s and the corresponding framebuffer pixel color is indicated by d.

GL_CLEAR0
GL_SET1
GL_COPYs
GL_COPY_INVERTED~s
GL_NOOPd
GL_INVERT~d
GL_ANDs&d
GL_NAND~(s&d)
GL_ORs|d
GL_NOR~(s|d)
GL_XORs^d
GL_EQUIV~(s^d)
GL_AND_REVERSEs&~d
GL_AND_INVERTED~s&d
GL_OR_REVERSEs|~d
GL_OR_INVERTED~s|d

This function generates the following errors.

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

Revision History

2010/01/07
Initial version.

CONFIDENTIAL