Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glXGetFBConfigAttrib"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glXGetFBConfigAttrib</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glXGetFBConfigAttrib</refname> | |
17 | <refpurpose>return information about a GLX frame buffer configuration</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>int <function>glXGetFBConfigAttrib</function></funcdef> | |
23 | <paramdef>Display * <parameter>dpy</parameter></paramdef> | |
24 | <paramdef>GLXFBConfig <parameter>config</parameter></paramdef> | |
25 | <paramdef>int <parameter>attribute</parameter></paramdef> | |
26 | <paramdef>int * <parameter>value</parameter></paramdef> | |
27 | </funcprototype> | |
28 | </funcsynopsis> | |
29 | </refsynopsisdiv> | |
30 | <!-- eqn: ignoring delim $$ --> | |
31 | <refsect1 id="parameters"><title>Parameters</title> | |
32 | <variablelist> | |
33 | <varlistentry> | |
34 | <term><parameter>dpy</parameter></term> | |
35 | <listitem> | |
36 | <para> | |
37 | Specifies the connection to the X server. | |
38 | </para> | |
39 | </listitem> | |
40 | </varlistentry> | |
41 | <varlistentry> | |
42 | <term><parameter>config</parameter></term> | |
43 | <listitem> | |
44 | <para> | |
45 | Specifies the GLX frame buffer configuration to be queried. | |
46 | </para> | |
47 | </listitem> | |
48 | </varlistentry> | |
49 | <varlistentry> | |
50 | <term><parameter>attribute</parameter></term> | |
51 | <listitem> | |
52 | <para> | |
53 | Specifies the attribute to be returned. | |
54 | </para> | |
55 | </listitem> | |
56 | </varlistentry> | |
57 | <varlistentry> | |
58 | <term><parameter>value</parameter></term> | |
59 | <listitem> | |
60 | <para> | |
61 | Returns the requested value. | |
62 | </para> | |
63 | </listitem> | |
64 | </varlistentry> | |
65 | </variablelist> | |
66 | </refsect1> | |
67 | <refsect1 id="description"><title>Description</title> | |
68 | <para> | |
69 | <function>glXGetFBConfigAttrib</function> sets <parameter>value</parameter> to the <parameter>attribute</parameter> value of GLX drawables | |
70 | created with respect to <parameter>config</parameter>. | |
71 | <function>glXGetFBConfigAttrib</function> returns an error code if it fails for any reason. | |
72 | Otherwise, <constant>Success</constant> is returned. | |
73 | </para> | |
74 | <para> | |
75 | <parameter>attribute</parameter> is one of the following: | |
76 | </para> | |
77 | <para> | |
78 | </para> | |
79 | <variablelist> | |
80 | <varlistentry> | |
81 | <term><constant>GLX_FBCONFIG_ID</constant></term> | |
82 | <listitem> | |
83 | <para> | |
84 | XID of the given GLXFBConfig. | |
85 | </para> | |
86 | </listitem> | |
87 | </varlistentry> | |
88 | <varlistentry> | |
89 | <term><constant>GLX_BUFFER_SIZE</constant></term> | |
90 | <listitem> | |
91 | <para> | |
92 | </para> | |
93 | <para> | |
94 | Number of bits per color buffer. | |
95 | If the frame buffer configuration supports RGBA contexts, then | |
96 | <constant>GLX_BUFFER_SIZE</constant> is the sum of | |
97 | <constant>GLX_RED_SIZE</constant>, | |
98 | <constant>GLX_GREEN_SIZE</constant>, | |
99 | <constant>GLX_BLUE_SIZE</constant>, and | |
100 | <constant>GLX_ALPHA_SIZE</constant>. | |
101 | If the frame buffer configuration supports only color index contexts, | |
102 | <constant>GLX_BUFFER_SIZE</constant> is the size of the | |
103 | color indexes. | |
104 | </para> | |
105 | </listitem> | |
106 | </varlistentry> | |
107 | <varlistentry> | |
108 | <term><constant>GLX_LEVEL</constant></term> | |
109 | <listitem> | |
110 | <para> | |
111 | </para> | |
112 | <para> | |
113 | Frame buffer level of the configuration. | |
114 | Level zero is the default frame buffer. | |
115 | Positive levels correspond to frame buffers that overlay the default buffer, | |
116 | and negative levels correspond to frame buffers that underlie the default | |
117 | buffer. | |
118 | </para> | |
119 | </listitem> | |
120 | </varlistentry> | |
121 | <varlistentry> | |
122 | <term><constant>GLX_DOUBLEBUFFER</constant></term> | |
123 | <listitem> | |
124 | <para> | |
125 | </para> | |
126 | <para> | |
127 | <constant>True</constant> if color buffers exist in front/back pairs that can be swapped, | |
128 | <constant>False</constant> otherwise. | |
129 | </para> | |
130 | </listitem> | |
131 | </varlistentry> | |
132 | <varlistentry> | |
133 | <term><constant>GLX_STEREO</constant></term> | |
134 | <listitem> | |
135 | <para> | |
136 | </para> | |
137 | <para> | |
138 | <constant>True</constant> if color buffers exist in left/right pairs, | |
139 | <constant>False</constant> otherwise. | |
140 | </para> | |
141 | </listitem> | |
142 | </varlistentry> | |
143 | <varlistentry> | |
144 | <term><constant>GLX_AUX_BUFFERS</constant></term> | |
145 | <listitem> | |
146 | <para> | |
147 | </para> | |
148 | <para> | |
149 | Number of auxiliary color buffers that are available. | |
150 | Zero indicates that no auxiliary color buffers exist. | |
151 | </para> | |
152 | </listitem> | |
153 | </varlistentry> | |
154 | <varlistentry> | |
155 | <term><constant>GLX_RED_SIZE</constant></term> | |
156 | <listitem> | |
157 | <para> | |
158 | </para> | |
159 | <para> | |
160 | Number of bits of red stored in each color buffer. | |
161 | Undefined if RGBA contexts are not supported by the frame buffer configuration. | |
162 | </para> | |
163 | </listitem> | |
164 | </varlistentry> | |
165 | <varlistentry> | |
166 | <term><constant>GLX_GREEN_SIZE</constant></term> | |
167 | <listitem> | |
168 | <para> | |
169 | </para> | |
170 | <para> | |
171 | Number of bits of green stored in each color buffer. | |
172 | Undefined if RGBA contexts are not supported by the frame buffer configuration. | |
173 | </para> | |
174 | </listitem> | |
175 | </varlistentry> | |
176 | <varlistentry> | |
177 | <term><constant>GLX_BLUE_SIZE</constant></term> | |
178 | <listitem> | |
179 | <para> | |
180 | </para> | |
181 | <para> | |
182 | Number of bits of blue stored in each color buffer. | |
183 | Undefined if RGBA contexts are not supported by the frame buffer configuration. | |
184 | </para> | |
185 | </listitem> | |
186 | </varlistentry> | |
187 | <varlistentry> | |
188 | <term><constant>GLX_ALPHA_SIZE</constant></term> | |
189 | <listitem> | |
190 | <para> | |
191 | </para> | |
192 | <para> | |
193 | Number of bits of alpha stored in each color buffer. | |
194 | Undefined if RGBA contexts are not supported by the frame buffer configuration. | |
195 | </para> | |
196 | </listitem> | |
197 | </varlistentry> | |
198 | <varlistentry> | |
199 | <term><constant>GLX_DEPTH_SIZE</constant></term> | |
200 | <listitem> | |
201 | <para> | |
202 | </para> | |
203 | <para> | |
204 | Number of bits in the depth buffer. | |
205 | </para> | |
206 | </listitem> | |
207 | </varlistentry> | |
208 | <varlistentry> | |
209 | <term><constant>GLX_STENCIL_SIZE</constant></term> | |
210 | <listitem> | |
211 | <para> | |
212 | </para> | |
213 | <para> | |
214 | Number of bits in the stencil buffer. | |
215 | </para> | |
216 | </listitem> | |
217 | </varlistentry> | |
218 | <varlistentry> | |
219 | <term><constant>GLX_ACCUM_RED_SIZE</constant></term> | |
220 | <listitem> | |
221 | <para> | |
222 | </para> | |
223 | <para> | |
224 | Number of bits of red stored in the accumulation buffer. | |
225 | </para> | |
226 | </listitem> | |
227 | </varlistentry> | |
228 | <varlistentry> | |
229 | <term><constant>GLX_ACCUM_GREEN_SIZE</constant></term> | |
230 | <listitem> | |
231 | <para> | |
232 | </para> | |
233 | <para> | |
234 | Number of bits of green stored in the accumulation buffer. | |
235 | </para> | |
236 | </listitem> | |
237 | </varlistentry> | |
238 | <varlistentry> | |
239 | <term><constant>GLX_ACCUM_BLUE_SIZE</constant></term> | |
240 | <listitem> | |
241 | <para> | |
242 | </para> | |
243 | <para> | |
244 | Number of bits of blue stored in the accumulation buffer. | |
245 | </para> | |
246 | </listitem> | |
247 | </varlistentry> | |
248 | <varlistentry> | |
249 | <term><constant>GLX_ACCUM_ALPHA_SIZE</constant></term> | |
250 | <listitem> | |
251 | <para> | |
252 | </para> | |
253 | <para> | |
254 | Number of bits of alpha stored in the accumulation buffer. | |
255 | </para> | |
256 | </listitem> | |
257 | </varlistentry> | |
258 | <varlistentry> | |
259 | <term><constant>GLX_RENDER_TYPE</constant></term> | |
260 | <listitem> | |
261 | <para> | |
262 | </para> | |
263 | <para> | |
264 | Mask indicating what type of GLX contexts can be made | |
265 | current to the frame buffer configuration. Valid bits are | |
266 | <constant>GLX_RGBA_BIT</constant> and | |
267 | <constant>GLX_COLOR_INDEX_BIT</constant>. | |
268 | </para> | |
269 | </listitem> | |
270 | </varlistentry> | |
271 | <varlistentry> | |
272 | <term><constant>GLX_DRAWABLE_TYPE</constant></term> | |
273 | <listitem> | |
274 | <para> | |
275 | </para> | |
276 | <para> | |
277 | Mask indicating what drawable types the frame buffer configuration | |
278 | supports. Valid bits are <constant>GLX_WINDOW_BIT</constant>, | |
279 | <constant>GLX_PIXMAP_BIT</constant>, and <constant>GLX_PBUFFER_BIT</constant>. | |
280 | </para> | |
281 | </listitem> | |
282 | </varlistentry> | |
283 | <varlistentry> | |
284 | <term><constant>GLX_X_RENDERABLE</constant></term> | |
285 | <listitem> | |
286 | <para> | |
287 | </para> | |
288 | <para> | |
289 | <constant>True</constant> if drawables created with the | |
290 | frame buffer configuration can be rendered to by X. | |
291 | </para> | |
292 | </listitem> | |
293 | </varlistentry> | |
294 | <varlistentry> | |
295 | <term><constant>GLX_VISUAL_ID</constant></term> | |
296 | <listitem> | |
297 | <para> | |
298 | </para> | |
299 | <para> | |
300 | XID of the corresponding visual, or zero | |
301 | if there is no associated visual (i.e., if | |
302 | <constant>GLX_X_RENDERABLE</constant> is <constant>False</constant> or | |
303 | <constant>GLX_DRAWABLE_TYPE</constant> does not have the | |
304 | <constant>GLX_WINDOW_BIT</constant> bit set). | |
305 | </para> | |
306 | </listitem> | |
307 | </varlistentry> | |
308 | <varlistentry> | |
309 | <term><constant>GLX_X_VISUAL_TYPE</constant></term> | |
310 | <listitem> | |
311 | <para> | |
312 | </para> | |
313 | <para> | |
314 | Visual type of associated visual. The returned value will be one of: | |
315 | <constant>GLX_TRUE_COLOR</constant>, <constant>GLX_DIRECT_COLOR</constant>, <constant>GLX_PSEUDO_COLOR</constant>, | |
316 | <constant>GLX_STATIC_COLOR</constant>, <constant>GLX_GRAY_SCALE</constant>, <constant>GLX_STATIC_GRAY</constant>, | |
317 | or <constant>GLX_NONE</constant>, if there is no associated visual (i.e., if | |
318 | <constant>GLX_X_RENDERABLE</constant> is <constant>False</constant> or | |
319 | <constant>GLX_DRAWABLE_TYPE</constant> does not have the | |
320 | <constant>GLX_WINDOW_BIT</constant> bit set). | |
321 | </para> | |
322 | </listitem> | |
323 | </varlistentry> | |
324 | <varlistentry> | |
325 | <term><constant>GLX_CONFIG_CAVEAT</constant></term> | |
326 | <listitem> | |
327 | <para> | |
328 | </para> | |
329 | <para> | |
330 | One of <constant>GLX_NONE</constant>, | |
331 | <constant>GLX_SLOW_CONFIG</constant>, or | |
332 | <constant>GLX_NON_CONFORMANT_CONFIG</constant>, indicating | |
333 | that the frame buffer configuration has no caveats, | |
334 | some aspect of the frame buffer configuration runs slower | |
335 | than other frame buffer configurations, or some aspect of the | |
336 | frame buffer configuration is nonconformant, respectively. | |
337 | </para> | |
338 | </listitem> | |
339 | </varlistentry> | |
340 | <varlistentry> | |
341 | <term><constant>GLX_TRANSPARENT_TYPE</constant></term> | |
342 | <listitem> | |
343 | <para> | |
344 | </para> | |
345 | <para> | |
346 | One of <constant>GLX_NONE</constant>, | |
347 | <constant>GLX_TRANSPARENT_RGB</constant>, | |
348 | <constant>GLX_TRANSPARENT_INDEX</constant>, indicating that | |
349 | the frame buffer configuration is opaque, is transparent for particular | |
350 | values of red, green, and blue, or is transparent for | |
351 | particular index values, respectively. | |
352 | </para> | |
353 | </listitem> | |
354 | </varlistentry> | |
355 | <varlistentry> | |
356 | <term><constant>GLX_TRANSPARENT_INDEX_VALUE</constant></term> | |
357 | <listitem> | |
358 | <para> | |
359 | </para> | |
360 | <para> | |
361 | Integer value between 0 and the maximum | |
362 | frame buffer value for indices, indicating the transparent | |
363 | index value for the frame buffer configuration. | |
364 | Undefined if <constant>GLX_TRANSPARENT_TYPE</constant> | |
365 | is not <constant>GLX_TRANSPARENT_INDEX</constant>. | |
366 | </para> | |
367 | </listitem> | |
368 | </varlistentry> | |
369 | <varlistentry> | |
370 | <term><constant>GLX_TRANSPARENT_RED_VALUE</constant></term> | |
371 | <listitem> | |
372 | <para> | |
373 | </para> | |
374 | <para> | |
375 | Integer value between 0 and the maximum | |
376 | frame buffer value for red, indicating the transparent | |
377 | red value for the frame buffer configuration. | |
378 | Undefined if <constant>GLX_TRANSPARENT_TYPE</constant> | |
379 | is not <constant>GLX_TRANSPARENT_RGB</constant>. | |
380 | </para> | |
381 | </listitem> | |
382 | </varlistentry> | |
383 | <varlistentry> | |
384 | <term><constant>GLX_TRANSPARENT_GREEN_VALUE</constant></term> | |
385 | <listitem> | |
386 | <para> | |
387 | </para> | |
388 | <para> | |
389 | Integer value between 0 and the maximum | |
390 | frame buffer value for green, indicating the transparent | |
391 | green value for the frame buffer configuration. | |
392 | Undefined if <constant>GLX_TRANSPARENT_TYPE</constant> | |
393 | is not <constant>GLX_TRANSPARENT_RGB</constant>. | |
394 | </para> | |
395 | </listitem> | |
396 | </varlistentry> | |
397 | <varlistentry> | |
398 | <term><constant>GLX_TRANSPARENT_BLUE_VALUE</constant></term> | |
399 | <listitem> | |
400 | <para> | |
401 | </para> | |
402 | <para> | |
403 | Integer value between 0 and the maximum | |
404 | frame buffer value for blue, indicating the transparent | |
405 | blue value for the frame buffer configuration. | |
406 | Undefined if <constant>GLX_TRANSPARENT_TYPE</constant> | |
407 | is not <constant>GLX_TRANSPARENT_RGB</constant>. | |
408 | </para> | |
409 | </listitem> | |
410 | </varlistentry> | |
411 | <varlistentry> | |
412 | <term><constant>GLX_TRANSPARENT_ALPHA_VALUE</constant></term> | |
413 | <listitem> | |
414 | <para> | |
415 | </para> | |
416 | <para> | |
417 | Integer value between 0 and the maximum | |
418 | frame buffer value for alpha, indicating the transparent | |
419 | blue value for the frame buffer configuration. | |
420 | Undefined if <constant>GLX_TRANSPARENT_TYPE</constant> | |
421 | is not <constant>GLX_TRANSPARENT_RGB</constant>. | |
422 | </para> | |
423 | </listitem> | |
424 | </varlistentry> | |
425 | <varlistentry> | |
426 | <term><constant>GLX_MAX_PBUFFER_WIDTH</constant></term> | |
427 | <listitem> | |
428 | <para> | |
429 | </para> | |
430 | <para> | |
431 | The maximum width that can be specified to | |
432 | <citerefentry><refentrytitle>glXCreatePbuffer</refentrytitle></citerefentry>. | |
433 | </para> | |
434 | </listitem> | |
435 | </varlistentry> | |
436 | <varlistentry> | |
437 | <term><constant>GLX_MAX_PBUFFER_HEIGHT</constant></term> | |
438 | <listitem> | |
439 | <para> | |
440 | </para> | |
441 | <para> | |
442 | The maximum height that can be specified to | |
443 | <citerefentry><refentrytitle>glXCreatePbuffer</refentrytitle></citerefentry>. | |
444 | </para> | |
445 | </listitem> | |
446 | </varlistentry> | |
447 | <varlistentry> | |
448 | <term><constant>GLX_MAX_PBUFFER_PIXELS</constant></term> | |
449 | <listitem> | |
450 | <para> | |
451 | </para> | |
452 | <para> | |
453 | The maximum number of pixels (width times height) for a | |
454 | pixel buffer. Note that this value may be less than | |
455 | <constant>GLX_MAX_PBUFFER_WIDTH</constant> times | |
456 | <constant>GLX_MAX_PBUFFER_HEIGHT</constant>. Also, this | |
457 | value is static and assumes that no other pixel buffers | |
458 | or X resources are contending for the frame buffer memory. | |
459 | As a result, it may not be possible to allocate a pixel buffer of | |
460 | the size given by <constant>GLX_MAX_PBUFFER_PIXELS</constant>. | |
461 | </para> | |
462 | </listitem> | |
463 | </varlistentry> | |
464 | </variablelist> | |
465 | <para> | |
466 | Applications should choose the frame buffer configuration that most closely | |
467 | meets their requirements. | |
468 | Creating windows, GLX pixmaps, or GLX pixel buffers with unnecessary buffers | |
469 | can result in | |
470 | reduced rendering performance as well as poor resource allocation. | |
471 | </para> | |
472 | </refsect1> | |
473 | <refsect1 id="notes"><title>Notes</title> | |
474 | <para> | |
475 | <function>glXGetFBConfigAttrib</function> is available only if the GLX version is 1.3 or greater. | |
476 | </para> | |
477 | <para> | |
478 | If the GLX version is 1.1 or 1.0, the GL version must be 1.0. | |
479 | If the GLX version is 1.2, then the GL version must be 1.1. | |
480 | If the GLX version is 1.3, then the GL version must be 1.2. | |
481 | </para> | |
482 | </refsect1> | |
483 | <refsect1 id="errors"><title>Errors</title> | |
484 | <para> | |
485 | <constant>GLX_NO_EXTENSION</constant> is returned if <parameter>dpy</parameter> does not support the GLX | |
486 | extension. | |
487 | <constant>GLX_BAD_ATTRIBUTE</constant> is returned if <parameter>attribute</parameter> is not a valid GLX attribute. | |
488 | </para> | |
489 | </refsect1> | |
490 | <refsect1 id="seealso"><title>See Also</title> | |
491 | <para> | |
492 | <citerefentry><refentrytitle>glXGetFBConfigs</refentrytitle></citerefentry>, | |
493 | <citerefentry><refentrytitle>glXChooseFBConfig</refentrytitle></citerefentry>, | |
494 | <citerefentry><refentrytitle>glXGetVisualFromFBConfig</refentrytitle></citerefentry>, | |
495 | <citerefentry><refentrytitle>glXGetConfig</refentrytitle></citerefentry> | |
496 | </para> | |
497 | </refsect1> | |
498 | <refsect1 id="Copyright"><title>Copyright</title> | |
499 | <para> | |
500 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
501 | Silicon Graphics, Inc. This document is licensed under the SGI | |
502 | Free Software B License. For details, see | |
503 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
504 | </para> | |
505 | </refsect1> | |
506 | </refentry> |