1GLDRAWBUFFER(3G) [FIXME: manual] GLDRAWBUFFER(3G)
2
3
4
6 glDrawBuffer, glNamedFramebufferDrawBuffer - specify which color
7 buffers are to be drawn into
8
10 void glDrawBuffer(GLenum buf);
11
12 void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf);
13
15 framebuffer
16 Specifies the name of the framebuffer object for
17 glNamedFramebufferDrawBuffer function. Must be zero or the name of
18 a framebuffer object.
19
20 buf
21 For default framebuffer, the argument specifies up to four color
22 buffers to be drawn into. Symbolic constants GL_NONE,
23 GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT,
24 GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, and GL_FRONT_AND_BACK are
25 accepted. The initial value is GL_FRONT for single-buffered
26 contexts, and GL_BACK for double-buffered contexts. For framebuffer
27 objects, GL_COLOR_ATTACHMENT$m$ and GL_NONE enums are accepted,
28 where $m$ is a value between 0 and GL_MAX_COLOR_ATTACHMENTS.
29
31 When colors are written to the frame buffer, they are written into the
32 color buffers specified by glDrawBuffer. One of the following values
33 can be used for default framebuffer:
34
35 GL_NONE
36 No color buffers are written.
37
38 GL_FRONT_LEFT
39 Only the front left color buffer is written.
40
41 GL_FRONT_RIGHT
42 Only the front right color buffer is written.
43
44 GL_BACK_LEFT
45 Only the back left color buffer is written.
46
47 GL_BACK_RIGHT
48 Only the back right color buffer is written.
49
50 GL_FRONT
51 Only the front left and front right color buffers are written. If
52 there is no front right color buffer, only the front left color
53 buffer is written.
54
55 GL_BACK
56 Only the back left and back right color buffers are written. If
57 there is no back right color buffer, only the back left color
58 buffer is written.
59
60 GL_LEFT
61 Only the front left and back left color buffers are written. If
62 there is no back left color buffer, only the front left color
63 buffer is written.
64
65 GL_RIGHT
66 Only the front right and back right color buffers are written. If
67 there is no back right color buffer, only the front right color
68 buffer is written.
69
70 GL_FRONT_AND_BACK
71 All the front and back color buffers (front left, front right, back
72 left, back right) are written. If there are no back color buffers,
73 only the front left and front right color buffers are written. If
74 there are no right color buffers, only the front left and back left
75 color buffers are written. If there are no right or back color
76 buffers, only the front left color buffer is written.
77
78 If more than one color buffer is selected for drawing, then blending or
79 logical operations are computed and applied independently for each
80 color buffer and can produce different results in each buffer.
81
82 Monoscopic contexts include only left buffers, and stereoscopic
83 contexts include both left and right buffers. Likewise, single-buffered
84 contexts include only front buffers, and double-buffered contexts
85 include both front and back buffers. The context is selected at GL
86 initialization.
87
88 For framebuffer objects, GL_COLOR_ATTACHMENT$m$ and GL_NONE enums are
89 accepted, where $m$ is a value between 0 and GL_MAX_COLOR_ATTACHMENTS.
90 glDrawBuffer will set the draw buffer for fragment colors other than
91 zero to GL_NONE.
92
94 GL_INVALID_OPERATION error is generated by glNamedFramebufferDrawBuffer
95 if framebuffer is not zero or the name of an existing framebuffer
96 object.
97
98 GL_INVALID_ENUM is generated if buf is not an accepted value.
99
100 GL_INVALID_OPERATION is generated if the default framebuffer is
101 affected and none of the buffers indicated by buf exists.
102
103 GL_INVALID_OPERATION is generated if a framebuffer object is affected
104 and buf is not equal to GL_NONE or GL_COLOR_ATTACHMENT$m$, where $m$ is
105 a value between 0 and GL_MAX_COLOR_ATTACHMENTS.
106
108 glGet() with argument GL_DRAW_BUFFER
109
111 ┌─────────────────────────────┬───────────────────────────────────────────────────────────────────────┐
112 │ │ OpenGL Version │
113 ├─────────────────────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
114 │Function │ 2.0 │ 2.1 │ 3.0 │ 3.1 │ 3.2 │ 3.3 │ 4.0 │ 4.1 │ 4.2 │ 4.3 │ 4.4 │ 4.5 │
115 │/ │ │ │ │ │ │ │ │ │ │ │ │ │
116 │Feature │ │ │ │ │ │ │ │ │ │ │ │ │
117 │Name │ │ │ │ │ │ │ │ │ │ │ │ │
118 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
119 │glDrawBuffer │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
120 ├─────────────────────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
121 │glNamedFramebufferDrawBuffer │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ - │ ✔ │
122 └─────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
123
125 glBlendFunc(), glColorMask(), glDrawBuffers(), glLogicOp(),
126 glReadBuffer()
127
129 Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
130 Khronos Group. This document is licensed under the SGI Free Software B
131 License. For details, see http://oss.sgi.com/projects/FreeB/.
132
134 Copyright © 1991-2006 Silicon Graphics, Inc.
135 Copyright © 2010-2014 Khronos Group
136
137
138
139[FIXME: source] 07/13/2018 GLDRAWBUFFER(3G)