1GLLOGICOP(3G)                   [FIXME: manual]                  GLLOGICOP(3G)
2
3
4

NAME

6       glLogicOp - specify a logical pixel operation for rendering
7

C SPECIFICATION

9       void glLogicOp(GLenum opcode);
10

PARAMETERS

12       opcode
13           Specifies a symbolic constant that selects a logical operation. The
14           following symbols are accepted: GL_CLEAR, GL_SET, GL_COPY,
15           GL_COPY_INVERTED, GL_NOOP, GL_INVERT, GL_AND, GL_NAND, GL_OR,
16           GL_NOR, GL_XOR, GL_EQUIV, GL_AND_REVERSE, GL_AND_INVERTED,
17           GL_OR_REVERSE, and GL_OR_INVERTED. The initial value is GL_COPY.
18

DESCRIPTION

20       glLogicOp specifies a logical operation that, when enabled, is applied
21       between the incoming RGBA color and the RGBA color at the corresponding
22       location in the frame buffer. To enable or disable the logical
23       operation, call glEnable() and
24
25       glDisable using the symbolic constant GL_COLOR_LOGIC_OP. The initial
26       value is disabled.
27
28       ┌─────────────────┬──────────────────────┐
29Opcode          Resulting Operation 
30       ├─────────────────┼──────────────────────┤
31GL_CLEAR         │          0           │
32       ├─────────────────┼──────────────────────┤
33GL_SET           │          1           │
34       ├─────────────────┼──────────────────────┤
35GL_COPY          │          s           │
36       ├─────────────────┼──────────────────────┤
37GL_COPY_INVERTED │          ~s          │
38       ├─────────────────┼──────────────────────┤
39GL_NOOP          │          d           │
40       ├─────────────────┼──────────────────────┤
41GL_INVERT        │          ~d          │
42       ├─────────────────┼──────────────────────┤
43GL_AND           │        s & d         │
44       ├─────────────────┼──────────────────────┤
45GL_NAND          │       ~(s & d)       │
46       ├─────────────────┼──────────────────────┤
47GL_OR            │        s | d         │
48       ├─────────────────┼──────────────────────┤
49GL_NOR           │       ~(s | d)       │
50       ├─────────────────┼──────────────────────┤
51GL_XOR           │        s ^ d         │
52       ├─────────────────┼──────────────────────┤
53GL_EQUIV         │       ~(s ^ d)       │
54       ├─────────────────┼──────────────────────┤
55GL_AND_REVERSE   │        s & ~d        │
56       ├─────────────────┼──────────────────────┤
57GL_AND_INVERTED  │        ~s & d        │
58       ├─────────────────┼──────────────────────┤
59GL_OR_REVERSE    │        s | ~d        │
60       ├─────────────────┼──────────────────────┤
61GL_OR_INVERTED   │        ~s | d        │
62       └─────────────────┴──────────────────────┘
63
64       opcode is a symbolic constant chosen from the list above. In the
65       explanation of the logical operations, s represents the incoming color
66       and d represents the color in the frame buffer. Standard C-language
67       operators are used. As these bitwise operators suggest, the logical
68       operation is applied independently to each bit pair of the source and
69       destination colors.
70

NOTES

72       When more than one RGBA color buffer is enabled for drawing, logical
73       operations are performed separately for each enabled buffer, using for
74       the destination value the contents of that buffer (see glDrawBuffer()).
75
76       Logic operations have no effect on floating point draw buffers.
77       However, if GL_COLOR_LOGIC_OP is enabled, blending is still disabled in
78       this case.
79

ERRORS

81       GL_INVALID_ENUM is generated if opcode is not an accepted value.
82

ASSOCIATED GETS

84       glGet() with argument GL_LOGIC_OP_MODE.
85
86       glIsEnabled() with argument GL_COLOR_LOGIC_OP.
87

VERSION SUPPORT

89       ┌──────────┬───────────────────────────────────────────────────────────────────────┐
90       │          │                OpenGL Version                                         
91       ├──────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
92Function  2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
93/         │     │     │     │     │     │     │     │     │     │     │     │     │
94Feature   │     │     │     │     │     │     │     │     │     │     │     │     │
95Name      │     │     │     │     │     │     │     │     │     │     │     │     │
96       ├──────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
97glLogicOp │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
98       └──────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
99

SEE ALSO

101       glBlendFunc(), glDrawBuffer(), glEnable(), glStencilOp()
102
104       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
105       Khronos Group. This document is licensed under the SGI Free Software B
106       License. For details, see http://oss.sgi.com/projects/FreeB/.
107
109       Copyright © 1991-2006 Silicon Graphics, Inc.
110       Copyright © 2010-2014 Khronos Group
111
112
113
114[FIXME: source]                   07/13/2018                     GLLOGICOP(3G)
Impressum