1GLDRAWBUFFER(3G)                                              GLDRAWBUFFER(3G)
2
3
4

NAME

6       glDrawBuffer - specify which color buffers are to be drawn into
7
8

C SPECIFICATION

10       void glDrawBuffer( GLenum mode )
11
12

PARAMETERS

14       mode  Specifies  up  to  four color buffers to be drawn into.  Symbolic
15             constants GL_NONE, GL_FRONT_LEFT,  GL_FRONT_RIGHT,  GL_BACK_LEFT,
16             GL_BACK_RIGHT,     GL_FRONT,    GL_BACK,    GL_LEFT,    GL_RIGHT,
17             GL_FRONT_AND_BACK, and GL_AUXi, where i is between 0 and
18             ``GL_AUX_BUFFERS'' -1, are accepted (GL_AUX_BUFFERS  is  not  the
19             upper  limit; use glGet to query the number of available aux buf‐
20             fers.)  The initial value is GL_FRONT  for  single-buffered  con‐
21             texts, and GL_BACK for double-buffered contexts.
22

DESCRIPTION

24       When  colors are written to the frame buffer, they are written into the
25       color buffers specified by glDrawBuffer.   The  specifications  are  as
26       follows:
27
28       GL_NONE                  No color buffers are written.
29
30       GL_FRONT_LEFT            Only the front left color buffer is written.
31
32       GL_FRONT_RIGHT           Only the front right color buffer is written.
33
34       GL_BACK_LEFT             Only the back left color buffer is written.
35
36       GL_BACK_RIGHT            Only the back right color buffer is written.
37
38       GL_FRONT                 Only the front left and front right color buf‐
39                                fers are written.  If there is no front  right
40                                color buffer, only the front left color buffer
41                                is written.
42
43       GL_BACK                  Only the back left and back right  color  buf‐
44                                fers  are  written.  If there is no back right
45                                color buffer, only the back left color  buffer
46                                is written.
47
48       GL_LEFT                  Only  the  front left and back left color buf‐
49                                fers are written.  If there is  no  back  left
50                                color buffer, only the front left color buffer
51                                is written.
52
53       GL_RIGHT                 Only the front right and back right color buf‐
54                                fers  are  written.  If there is no back right
55                                color buffer, only the front right color  buf‐
56                                fer is written.
57
58       GL_FRONT_AND_BACK        All  the  front  and back color buffers (front
59                                left, front right, back left, back right)  are
60                                written.   If there are no back color buffers,
61                                only the front left and front right color buf‐
62                                fers are written.  If there are no right color
63                                buffers, only the front  left  and  back  left
64                                color  buffers  are  written.  If there are no
65                                right or back color buffers,  only  the  front
66                                left color buffer is written.
67
68       GL_AUXi                  Only auxiliary color buffer i is written.
69
70       If more than one color buffer is selected for drawing, then blending or
71       logical operations are computed  and  applied  independently  for  each
72       color buffer and can produce different results in each buffer.
73
74       Monoscopic  contexts  include  only left buffers, and stereoscopic con‐
75       texts include both left and right buffers.   Likewise,  single-buffered
76       contexts  include  only  front  buffers,  and  double-buffered contexts
77       include both front and back buffers.  The context  is  selected  at  GL
78       initialization.
79

NOTES

81       It is always the case that GL_AUXi = GL_AUX0 + i.
82

ERRORS

84       GL_INVALID_ENUM is generated if mode is not an accepted value.
85
86       GL_INVALID_OPERATION  is  generated if none of the buffers indicated by
87       mode exists.
88
89       GL_INVALID_OPERATION is generated if glDrawBuffer is  executed  between
90       the execution of glBegin and the corresponding execution of glEnd.
91

ASSOCIATED GETS

93       glGet with argument GL_DRAW_BUFFER
94       glGet with argument GL_AUX_BUFFERS
95

SEE ALSO

97       glBlendFunc(3G),   glColorMask(3G),   glIndexMask(3G),   glLogicOp(3G),
98       glReadBuffer(3G)
99
100
101
102                                                              GLDRAWBUFFER(3G)
Impressum