'\" t .\" Title: glLogicOp .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLLOGICOP" "3G" "05/21/2015" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glLogicOp \- specify a logical pixel operation for rendering .SH "C SPECIFICATION" .HP \w'void\ glLogicOp('u .BI "void glLogicOp(GLenum\ " "opcode" ");" .SH "PARAMETERS" .PP \fIopcode\fR .RS 4 Specifies a symbolic constant that selects a logical operation\&. The following symbols are accepted: \fBGL_CLEAR\fR, \fBGL_SET\fR, \fBGL_COPY\fR, \fBGL_COPY_INVERTED\fR, \fBGL_NOOP\fR, \fBGL_INVERT\fR, \fBGL_AND\fR, \fBGL_NAND\fR, \fBGL_OR\fR, \fBGL_NOR\fR, \fBGL_XOR\fR, \fBGL_EQUIV\fR, \fBGL_AND_REVERSE\fR, \fBGL_AND_INVERTED\fR, \fBGL_OR_REVERSE\fR, and \fBGL_OR_INVERTED\fR\&. The initial value is \fBGL_COPY\fR\&. .RE .SH "DESCRIPTION" .PP \fBglLogicOp\fR specifies a logical operation that, when enabled, is applied between the incoming RGBA color and the RGBA color at the corresponding location in the frame buffer\&. To enable or disable the logical operation, call \fBglEnable\fR() and \fBglDisable\fR() using the symbolic constant \fBGL_COLOR_LOGIC_OP\fR\&. The initial value is disabled\&. .PP .TS allbox tab(:); lB cB. T{ \fB Opcode \fR T}:T{ \fB Resulting Operation \fR T} .T& l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c l c. T{ \fBGL_CLEAR\fR T}:T{ 0 T} T{ \fBGL_SET\fR T}:T{ 1 T} T{ \fBGL_COPY\fR T}:T{ s T} T{ \fBGL_COPY_INVERTED\fR T}:T{ ~s T} T{ \fBGL_NOOP\fR T}:T{ d T} T{ \fBGL_INVERT\fR T}:T{ ~d T} T{ \fBGL_AND\fR T}:T{ s & d T} T{ \fBGL_NAND\fR T}:T{ ~(s & d) T} T{ \fBGL_OR\fR T}:T{ s | d T} T{ \fBGL_NOR\fR T}:T{ ~(s | d) T} T{ \fBGL_XOR\fR T}:T{ s ^ d T} T{ \fBGL_EQUIV\fR T}:T{ ~(s ^ d) T} T{ \fBGL_AND_REVERSE\fR T}:T{ s & ~d T} T{ \fBGL_AND_INVERTED\fR T}:T{ ~s & d T} T{ \fBGL_OR_REVERSE\fR T}:T{ s | ~d T} T{ \fBGL_OR_INVERTED\fR T}:T{ ~s | d T} .TE .PP \fIopcode\fR is a symbolic constant chosen from the list above\&. In the explanation of the logical operations, \fIs\fR represents the incoming color and \fId\fR represents the color in the frame buffer\&. Standard C\-language operators are used\&. As these bitwise operators suggest, the logical operation is applied independently to each bit pair of the source and destination colors\&. .SH "NOTES" .PP When more than one RGBA color buffer is enabled for drawing, logical operations are performed separately for each enabled buffer, using for the destination value the contents of that buffer (see \fBglDrawBuffer\fR())\&. .PP Logic operations have no effect on floating point draw buffers\&. However, if \fBGL_COLOR_LOGIC_OP\fR is enabled, blending is still disabled in this case\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fIopcode\fR is not an accepted value\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_LOGIC_OP_MODE\fR\&. .PP \fBglIsEnabled\fR() with argument \fBGL_COLOR_LOGIC_OP\fR\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglLogicOp\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp .SH "SEE ALSO" .PP \fBglBlendFunc\fR(), \fBglDrawBuffer\fR(), \fBglEnable\fR(), \fBglStencilOp\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br