GLLOGICOP(3G)
β¨ NAME β¨
glLogicOp β specify a logical pixel operation for rendering. okay so this is the GLLOGICOP(3G) manual page, and yes the header lowkey has a [FIXME: manual] placeholder, but we move. π
πΈ C SPECIFICATION πΈ
void glLogicOp(GLenum opcode);
π PARAMETERS π
opcodeβ specifies a symbolic constant that selects a logical operation. The accepted symbols are:GL_CLEAR,GL_SET,GL_COPY,GL_COPY_INVERTED,GL_NOOP,GL_INVERT,GL_AND,GL_NAND,GL_OR,GL_NOR,GL_XOR,GL_EQUIV,GL_AND_REVERSE,GL_AND_INVERTED,GL_OR_REVERSE, andGL_OR_INVERTED. The initial value isGL_COPY. no cap, that's the whole menu.
π¦ DESCRIPTION π¦
okay so glLogicOp 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 glEnable() and glDisable using the symbolic constant GL_COLOR_LOGIC_OP. The initial value is disabled.
Here's the iconic cheat sheet, bestie β s is the incoming color and d is the color in the frame buffer:
GL_CLEARβ0GL_SETβ1GL_COPYβsGL_COPY_INVERTEDβ~sGL_NOOPβdGL_INVERTβ~dGL_ANDβs & dGL_NANDβ~(s & d)GL_ORβs | dGL_NORβ~(s | d)GL_XORβs ^ dGL_EQUIVβ~(s ^ d)GL_AND_REVERSEβs & ~dGL_AND_INVERTEDβ~s & dGL_OR_REVERSEβs | ~dGL_OR_INVERTEDβ~s | d
opcode is a symbolic constant chosen from the list above. In the explanation of the logical operations, s represents the incoming color and d 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. it's giving bitwise realness, fr fr.
π NOTES π
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 glDrawBuffer()).
Logic operations have no effect on floating point draw buffers. However, if GL_COLOR_LOGIC_OP is enabled, blending is still disabled in this case. π
π¨ ERRORS π¨
GL_INVALID_ENUM is generated if opcode is not an accepted value.
π ASSOCIATED GETS π
glGet()with argumentGL_LOGIC_OP_MODE.glIsEnabled()with argumentGL_COLOR_LOGIC_OP.
π VERSION SUPPORT π
Function / Feature Name: glLogicOp
- OpenGL 2.0 β β
- OpenGL 2.1 β β
- OpenGL 3.0 β β
- OpenGL 3.1 β β
- OpenGL 3.2 β β
- OpenGL 3.3 β β
- OpenGL 4.0 β β
- OpenGL 4.1 β β
- OpenGL 4.2 β β
- OpenGL 4.3 β β
- OpenGL 4.4 β β
- OpenGL 4.5 β β
π SEE ALSO π
glBlendFunc()glDrawBuffer()glEnable()glStencilOp()
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.
π COPYRIGHT (yes, again, because the page says it twice) π
Copyright Β© 1991-2006 Silicon Graphics, Inc.
Copyright Β© 2010-2014 Khronos Group
okay bye bestie π β source/version: [FIXME: source]; date: 08/09/2021; manual: GLLOGICOP(3G). periodt.
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms