glLogicOp Function
GL_APICALL void GL_APIENTRY glLogicOp(
GLenum opcode
);
| Name | Description | |
|---|---|---|
| in | opcode | Logical operation mode |
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_CLEAR | 0 |
|---|---|
| GL_SET | 1 |
| GL_COPY | s |
| GL_COPY_INVERTED | ~s |
| GL_NOOP | d |
| GL_INVERT | ~d |
| GL_AND | s&d |
| GL_NAND | ~(s&d) |
| GL_OR | s|d |
| GL_NOR | ~(s|d) |
| GL_XOR | s^d |
| GL_EQUIV | ~(s^d) |
| GL_AND_REVERSE | s&~d |
| GL_AND_INVERTED | ~s&d |
| GL_OR_REVERSE | s|~d |
| GL_OR_INVERTED | ~s|d |
This function generates the following errors.
| GL_INVALID_ENUM | The opcode argument was set to an invalid value. |
|---|---|
| GL_INVALID_OPERATION | This function was called without any command-list objects bound. |
CONFIDENTIAL