8
.ds Xs 60987 10 xgetconfig.gl
12
\- return information about GLX visuals
15
int \f3glXGetConfig\fP(
18
.ta \w'\f3int \fPglXGetConfig( 'u
19
XVisualInfo \fI*vis\fP,
28
.TP \w'\fIattrib\fP\ \ 'u
30
Specifies the connection to the X server.
33
Specifies the visual to be queried.
34
It is a pointer to an \f3XVisualInfo\fP structure,
35
not a visual ID or a pointer to a \f3Visual\fP.
38
Specifies the visual attribute to be returned.
41
Returns the requested value.
43
\f3glXGetConfig\fP sets \f2value\fP to the \f2attrib\fP value of windows or GLX pixmaps
44
created with respect to \f2vis\fP.
45
\f3glXGetConfig\fP returns an error code if it fails for any reason.
46
Otherwise, zero is returned.
48
\f2attrib\fP is one of the following:
52
\f3True\fP if OpenGL rendering is supported by this visual,
53
\f3False\fP otherwise.
56
Number of bits per color buffer.
57
For RGBA visuals, \f3GLX_BUFFER_SIZE\fP is the sum of
60
\f3GLX_BLUE_SIZE\fP, and
62
For color index visuals, \f3GLX_BUFFER_SIZE\fP is the size of the
66
Frame buffer level of the visual.
67
Level zero is the default frame buffer.
68
Positive levels correspond to frame buffers that overlay the default buffer,
69
and negative levels correspond to frame buffers that underlay the default
73
\f3True\fP if color buffers store red, green, blue, and alpha values.
74
\f3False\fP if they store color indexes.
76
\f3GLX_DOUBLEBUFFER\fP
77
\f3True\fP if color buffers exist in front/back pairs that can be swapped,
78
\f3False\fP otherwise.
81
\f3True\fP if color buffers exist in left/right pairs,
82
\f3False\fP otherwise.
85
Number of auxiliary color buffers that are available.
86
Zero indicates that no auxiliary color buffers exist.
89
Number of bits of red stored in each color buffer.
90
Undefined if \f3GLX_RGBA\fP is \f3False\fP.
93
Number of bits of green stored in each color buffer.
94
Undefined if \f3GLX_RGBA\fP is \f3False\fP.
97
Number of bits of blue stored in each color buffer.
98
Undefined if \f3GLX_RGBA\fP is \f3False\fP.
101
Number of bits of alpha stored in each color buffer.
102
Undefined if \f3GLX_RGBA\fP is \f3False\fP.
105
Number of bits in the depth buffer.
107
\f3GLX_STENCIL_SIZE\fP
108
Number of bits in the stencil buffer.
110
\f3GLX_ACCUM_RED_SIZE\fP
111
Number of bits of red stored in the accumulation buffer.
113
\f3GLX_ACCUM_GREEN_SIZE\fP
114
Number of bits of green stored in the accumulation buffer.
116
\f3GLX_ACCUM_BLUE_SIZE\fP
117
Number of bits of blue stored in the accumulation buffer.
119
\f3GLX_ACCUM_ALPHA_SIZE\fP
120
Number of bits of alpha stored in the accumulation buffer.
123
The X protocol allows a single visual ID to be instantiated with
124
different numbers of bits per pixel.
125
Windows or GLX pixmaps that will be rendered with OpenGL, however,
126
must be instantiated with a color buffer depth of \f3GLX_BUFFER_SIZE\fP.
128
Although a GLX implementation can export many visuals that support GL
131
at least one RGBA visual. This visual must have at
132
least one color buffer,
133
a stencil buffer of at least 1 bit,
134
a depth buffer of at least 12 bits,
135
and an accumulation buffer.
136
Alpha bitplanes are optional in this visual.
138
its color buffer size must be as great as that of the
139
deepest \f3TrueColor\fP, \f3DirectColor\fP,
140
\f3PseudoColor\fP, or \f3StaticColor\fP visual supported on level zero,
141
and it must itself be made available on level zero.
143
In addition, if the X server exports a \f3PseudoColor\fP
144
or \f3StaticColor\fP visual on framebuffer level 0, a color index
145
visual is also required on that level.
147
at least one color buffer,
148
a stencil buffer of at least 1 bit,
149
and a depth buffer of at least 12 bits.
152
color bitplanes as the deepest
153
\f3PseudoColor\fP or \f3StaticColor\fP visual supported on level 0.
155
Applications are best written to select the visual that most closely
156
meets their requirements.
157
Creating windows or GLX pixmaps with unnecessary buffers can result in
158
reduced rendering performance as well as poor resource allocation.
160
\f3XVisualInfo\fP is defined in \f2Xutil.h.\fP
161
It is a structure that includes \f2visual\fP, \f2visualID\fP, \f2screen\fP, and
162
\f2depth\fP elements.
164
\f3GLX_NO_EXTENSION\fP is returned if \f2dpy\fP does not support the GLX
167
\f3GLX_BAD_SCREEN\fP is returned if the screen of \f2vis\fP does not correspond
170
\f3GLX_BAD_ATTRIBUTE\fP is returned if \f2attrib\fP is not a valid GLX attribute.
172
\f3GLX_BAD_VISUAL\fP is returned if \f2vis\fP doesn't support GLX and an
173
attribute other than \f3GLX_USE_GL\fP is requested.
175
\f3glXChooseVisual\fP,
176
\f3glXCreateContext\fP