Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1452 chris 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="glXChooseFBConfig">
5
    <refmeta>
6
        <refmetainfo>
7
            <copyright>
8
                <year>1991-2006</year>
9
                <holder>Silicon Graphics, Inc.</holder>
10
            </copyright>
11
        </refmetainfo>
12
        <refentrytitle>glXChooseFBConfig</refentrytitle>
13
        <manvolnum>3G</manvolnum>
14
    </refmeta>
15
    <refnamediv>
16
        <refname>glXChooseFBConfig</refname>
17
        <refpurpose>return a list of GLX frame buffer configurations that match the specified attributes</refpurpose>
18
    </refnamediv>
19
    <refsynopsisdiv><title>C Specification</title>
20
        <funcsynopsis>
21
            <funcprototype>
22
                <funcdef>GLXFBConfig * <function>glXChooseFBConfig</function></funcdef>
23
                <paramdef>Display * <parameter>dpy</parameter></paramdef>
24
                <paramdef>int <parameter>screen</parameter></paramdef>
25
                <paramdef>const int * <parameter>attrib_list</parameter></paramdef>
26
                <paramdef>int * <parameter>nelements</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>screen</parameter></term>
43
            <listitem>
44
                <para>
45
                    Specifies the screen number.
46
                </para>
47
            </listitem>
48
        </varlistentry>
49
        <varlistentry>
50
            <term><parameter>attrib_list</parameter></term>
51
            <listitem>
52
                <para>
53
                    Specifies a list of attribute/value pairs.
54
                    The last attribute must be <constant>None</constant>.
55
                </para>
56
            </listitem>
57
        </varlistentry>
58
        <varlistentry>
59
            <term><parameter>nelements</parameter></term>
60
            <listitem>
61
                <para>
62
                    Returns the number of elements in the list returned by <function>glXChooseFBConfig</function>.
63
                </para>
64
            </listitem>
65
        </varlistentry>
66
        </variablelist>
67
    </refsect1>
68
    <refsect1 id="description"><title>Description</title>
69
        <para>
70
            <function>glXChooseFBConfig</function> returns GLX frame buffer configurations that match the attributes
71
            specified in <parameter>attrib_list</parameter>, or <constant>NULL</constant> if no matches are found.
72
            If <parameter>attrib_list</parameter> is <constant>NULL</constant>, then <function>glXChooseFBConfig</function> returns an array of GLX
73
            frame buffer configurations that are available on the specified screen.
74
            If an error occurs, no frame buffer configurations exist on the
75
            specified screen, or if no frame buffer configurations match the
76
            specified attributes, then <constant>NULL</constant> is returned.
77
            Use <function>XFree</function> to free the memory returned by
78
            <function>glXChooseFBConfig</function>.
79
        </para>
80
        <para>
81
            All attributes in <parameter>attrib_list</parameter>, including boolean attributes, are
82
            immediately followed by the corresponding desired value. The list is
83
            terminated with <constant>None</constant>. If an attribute is not specified in <parameter>attrib_list</parameter>,
84
            then the default value (see below) is used (and the attribute is said to be
85
            specified implicitly). For example, if <constant>GLX_STEREO</constant> is not specified, then
86
            it is assumed to be <constant>False</constant>. For some attributes, the default is
87
            <constant>GLX_DONT_CARE</constant>, meaning that any value is OK for this attribute, so the
88
            attribute will not be checked.
89
        </para>
90
        <para>
91
            Attributes are matched in an attribute-specific manner.
92
            Some of the attributes, such as <constant>GLX_LEVEL</constant>, must match the specified
93
            value exactly; others, such as, <constant>GLX_RED_SIZE</constant> must meet or exceed the
94
            specified minimum values. If more than one GLX frame buffer configuration is found,
95
            then a list of configurations, sorted
96
            according to the ``best'' match criteria, is returned. The match
97
            criteria for each attribute and the exact sorting order is
98
            defined below.  
99
        </para>
100
        <para>
101
            The interpretations of the various GLX visual attributes are as follows:
102
        </para>
103
        <variablelist>
104
            <varlistentry>
105
                <term><constant>GLX_FBCONFIG_ID</constant></term>
106
                <listitem>
107
                    <para>
108
                    </para>
109
                    <para>
110
                        Must be followed by a valid XID that indicates the desired GLX frame
111
                        buffer configuration. When a <constant>GLX_FBCONFIG_ID</constant> is specified, all
112
                        attributes are ignored. The default value is <constant>GLX_DONT_CARE</constant>.
113
                    </para>
114
                </listitem>
115
            </varlistentry>
116
            <varlistentry>
117
                <term><constant>GLX_BUFFER_SIZE</constant></term>
118
                <listitem>
119
                    <para>
120
                    </para>
121
                    <para>
122
                        Must be followed by a nonnegative integer that indicates the desired
123
                        color index buffer size.
124
                        The smallest index buffer of at least the specified size is preferred.
125
                        This attribute is ignored if <constant>GLX_COLOR_INDEX_BIT</constant> is not set in
126
                        <constant>GLX_RENDER_TYPE</constant>. The default value is 0.
127
                    </para>
128
                </listitem>
129
            </varlistentry>
130
            <varlistentry>
131
                <term><constant>GLX_LEVEL</constant></term>
132
                <listitem>
133
                    <para>
134
                    </para>
135
                    <para>
136
                        Must be followed by an integer buffer-level specification.
137
                        This specification is honored exactly.
138
                        Buffer level 0 corresponds to the default frame buffer of the display.
139
                        Buffer level 1 is the first overlay frame buffer, level two the second
140
                        overlay frame buffer, and so on.
141
                        Negative buffer levels correspond to underlay frame buffers.
142
                        The default value is 0.
143
                    </para>
144
                </listitem>
145
            </varlistentry>
146
            <varlistentry>
147
                <term><constant>GLX_DOUBLEBUFFER</constant></term>
148
                <listitem>
149
                    <para>
150
                    </para>
151
                    <para>
152
                        Must be followed by <constant>True</constant> or <constant>False</constant>. If
153
                        <constant>True</constant> is specified, then
154
                        only double-buffered frame buffer configurations are considered;
155
                        if
156
                        <constant>False</constant> is specified, then
157
                        only single-buffered frame buffer configurations are considered.
158
                        The default value is <constant>GLX_DONT_CARE</constant>.
159
                    </para>
160
                </listitem>
161
            </varlistentry>
162
            <varlistentry>
163
                <term><constant>GLX_STEREO</constant></term>
164
                <listitem>
165
                    <para>
166
                    </para>
167
                    <para>
168
                        Must be followed by <constant>True</constant> or <constant>False</constant>. If
169
                        <constant>True</constant> is specified, then
170
                        only stereo frame buffer configurations are considered;
171
                        if
172
                        <constant>False</constant> is specified, then
173
                        only monoscopic frame buffer configurations are considered.
174
                        The default value is <constant>False</constant>.
175
                    </para>
176
                </listitem>
177
            </varlistentry>
178
            <varlistentry>
179
                <term><constant>GLX_AUX_BUFFERS</constant></term>
180
                <listitem>
181
                    <para>
182
                    </para>
183
                    <para>
184
                        Must be followed by a nonnegative integer that indicates the desired
185
                        number of auxiliary buffers.
186
                        Configurations with the
187
                        smallest number of auxiliary buffers that meet or exceed
188
                        the specified number are preferred.
189
                        The default value is 0.
190
                    </para>
191
                </listitem>
192
            </varlistentry>
193
            <varlistentry>
194
                <term><constant>GLX_RED_SIZE</constant>, <constant>GLX_GREEN_SIZE</constant>, <constant>GLX_BLUE_SIZE</constant>, <constant>GLX_ALPHA_SIZE</constant></term>
195
                <listitem>
196
                    <para>
197
                    </para>
198
                    <para>
199
                        Each attribute, if present, must be followed by a nonnegative minimum size
200
                        specification or <constant>GLX_DONT_CARE</constant>.
201
                        The largest available total RGBA color buffer size (sum of <constant>GLX_RED_SIZE</constant>,
202
                        <constant>GLX_GREEN_SIZE</constant>, <constant>GLX_BLUE_SIZE</constant>, and <constant>GLX_ALPHA_SIZE</constant>)
203
                        of at least the minimum size specified for each color component is preferred.
204
                        If the requested number of bits for a color component is 0 or
205
                        <constant>GLX_DONT_CARE</constant>, it is not considered. The default value for each color
206
                        component is 0.
207
                    </para>
208
                </listitem>
209
            </varlistentry>
210
            <varlistentry>
211
                <term><constant>GLX_DEPTH_SIZE</constant></term>
212
                <listitem>
213
                    <para>
214
                    </para>
215
                    <para>
216
                        Must be followed by a nonnegative minimum size specification.
217
                        If this value is zero,
218
                        frame buffer configurations with no depth buffer are preferred.
219
                        Otherwise, the largest available depth buffer of at least the minimum size
220
                        is preferred.
221
                        The default value is 0.
222
                    </para>
223
                </listitem>
224
            </varlistentry>
225
            <varlistentry>
226
                <term><constant>GLX_STENCIL_SIZE</constant></term>
227
                <listitem>
228
                    <para>
229
                    </para>
230
                    <para>
231
                        Must be followed by a nonnegative integer that indicates the desired
232
                        number of stencil bitplanes.
233
                        The smallest stencil buffer of at least the specified size is preferred.
234
                        If the desired value is zero,
235
                        frame buffer configurations with no stencil buffer are preferred.
236
                        The default value is 0.
237
                    </para>
238
                </listitem>
239
            </varlistentry>
240
            <varlistentry>
241
                <term><constant>GLX_ACCUM_RED_SIZE</constant></term>
242
                <listitem>
243
                    <para>
244
                    </para>
245
                    <para>
246
                        Must be followed by a nonnegative minimum size specification.
247
                        If this value is zero,
248
                        frame buffer configurations with no red accumulation buffer are preferred.
249
                        Otherwise, the largest possible red accumulation buffer
250
                        of at least the minimum size is preferred.
251
                        The default value is 0.
252
                    </para>
253
                </listitem>
254
            </varlistentry>
255
            <varlistentry>
256
                <term><constant>GLX_ACCUM_GREEN_SIZE</constant></term>
257
                <listitem>
258
                    <para>
259
                    </para>
260
                    <para>
261
                        Must be followed by a nonnegative minimum size specification.
262
                        If this value is zero,
263
                        frame buffer configurations with no green accumulation buffer are preferred.
264
                        Otherwise, the largest possible green accumulation buffer
265
                        of at least the minimum size is preferred.
266
                        The default value is 0.
267
                    </para>
268
                </listitem>
269
            </varlistentry>
270
            <varlistentry>
271
                <term><constant>GLX_ACCUM_BLUE_SIZE</constant></term>
272
                <listitem>
273
                    <para>
274
                    </para>
275
                    <para>
276
                        Must be followed by a nonnegative minimum size specification.
277
                        If this value is zero,
278
                        frame buffer configurations with no blue accumulation buffer are preferred.
279
                        Otherwise, the largest possible blue accumulation buffer
280
                        of at least the minimum size is preferred.
281
                        The default value is 0.
282
                    </para>
283
                </listitem>
284
            </varlistentry>
285
            <varlistentry>
286
                <term><constant>GLX_ACCUM_ALPHA_SIZE</constant></term>
287
                <listitem>
288
                    <para>
289
                    </para>
290
                    <para>
291
                        Must be followed by a nonnegative minimum size specification.
292
                        If this value is zero,
293
                        frame buffer configurations with no alpha accumulation buffer are preferred.
294
                        Otherwise, the largest possible alpha accumulation buffer
295
                        of at least the minimum size is preferred.
296
                        The default value is 0.
297
                    </para>
298
                </listitem>
299
            </varlistentry>
300
            <varlistentry>
301
                <term><constant>GLX_RENDER_TYPE</constant></term>
302
                <listitem>
303
                    <para>
304
                    </para>
305
                    <para>
306
                        Must be followed by a mask indicating which OpenGL rendering modes
307
                        the frame buffer configuration must support.
308
                        Valid bits are <constant>GLX_RGBA_BIT</constant> and
309
                        <constant>GLX_COLOR_INDEX_BIT</constant>. If the mask is
310
                        set to <constant>GLX_RGBA_BIT</constant> | <constant>GLX_COLOR_INDEX_BIT</constant>,
311
                        then only frame buffer configurations that can be bound to both
312
                        RGBA contexts and color index contexts will be considered.
313
                        The default value is <constant>GLX_RGBA_BIT</constant>.
314
                    </para>
315
                </listitem>
316
            </varlistentry>
317
            <varlistentry>
318
                <term><constant>GLX_DRAWABLE_TYPE</constant></term>
319
                <listitem>
320
                    <para>
321
                    </para>
322
                    <para>
323
                        Must be followed by a mask indicating which GLX drawable types
324
                        the frame buffer configuration must support. Valid bits are
325
                        <constant>GLX_WINDOW_BIT</constant>,
326
                        <constant>GLX_PIXMAP_BIT</constant>, and <constant>GLX_PBUFFER_BIT</constant>.
327
                        For example, if mask is set to
328
                        <constant>GLX_WINDOW_BIT</constant> | <constant>GLX_PIXMAP_BIT</constant>,
329
                        only frame buffer configurations that support both windows and GLX pixmaps
330
                        will be considered.
331
                        The default value is <constant>GLX_WINDOW_BIT</constant>.
332
                    </para>
333
                </listitem>
334
            </varlistentry>
335
            <varlistentry>
336
                <term><constant>GLX_X_RENDERABLE</constant></term>
337
                <listitem>
338
                    <para>
339
                    </para>
340
                    <para>
341
                        Must be followed by <constant>True</constant> or <constant>False</constant>.
342
                        If <constant>True</constant> is specified, then only frame buffer configurations that
343
                        have associated X visuals (and can be used to render to Windows and/or
344
                        GLX pixmaps) will be considered.
345
                        The default value is <constant>GLX_DONT_CARE</constant>.
346
                    </para>
347
                </listitem>
348
            </varlistentry>
349
            <varlistentry>
350
                <term><constant>GLX_X_VISUAL_TYPE</constant></term>
351
                <listitem>
352
                    <para>
353
                    </para>
354
                    <para>
355
                        Must be followed by one of
356
                        <constant>GLX_TRUE_COLOR</constant>,
357
                        <constant>GLX_DIRECT_COLOR</constant>,
358
                        <constant>GLX_PSEUDO_COLOR</constant>,
359
                        <constant>GLX_STATIC_COLOR</constant>,
360
                        <constant>GLX_GRAY_SCALE</constant>, or
361
                        <constant>GLX_STATIC_GRAY</constant>, indicating the desired X visual type.
362
                        Not all frame buffer configurations have an associated X visual. If
363
                        <constant>GLX_DRAWABLE_TYPE</constant> is specified in <parameter>attrib_list</parameter> and the
364
                        mask that follows does not have <constant>GLX_WINDOW_BIT</constant> set,
365
                        then this value is ignored. It is also ignored if
366
                        <constant>GLX_X_RENDERABLE</constant> is specified as <constant>False</constant>.
367
                        RGBA rendering may be supported for visuals of type
368
                        <constant>GLX_TRUE_COLOR</constant>,
369
                        <constant>GLX_DIRECT_COLOR</constant>,
370
                        <constant>GLX_PSEUDO_COLOR</constant>,
371
                        or <constant>GLX_STATIC_COLOR</constant>,
372
                        but color index rendering is only supported for visuals of type
373
                        <constant>GLX_PSEUDO_COLOR</constant> or <constant>GLX_STATIC_COLOR</constant>
374
                        (i.e., single-channel visuals).
375
                        The tokens <constant>GLX_GRAY_SCALE</constant> and <constant>GLX_STATIC_GRAY</constant> will
376
                        not match current OpenGL enabled visuals, but are included for future use.
377
                        The default value for <constant>GLX_X_VISUAL_TYPE</constant> is <constant>GLX_DONT_CARE</constant>.
378
                    </para>
379
                </listitem>
380
            </varlistentry>
381
            <varlistentry>
382
                <term><constant>GLX_CONFIG_CAVEAT</constant></term>
383
                <listitem>
384
                    <para>
385
                    </para>
386
                    <para>
387
                        Must be followed by one of
388
                        <constant>GLX_NONE</constant>,
389
                        <constant>GLX_SLOW_CONFIG</constant>,
390
                        <constant>GLX_NON_CONFORMANT_CONFIG</constant>.
391
                        If <constant>GLX_NONE</constant> is specified, then only frame buffer configurations with
392
                        no caveats will be considered; if <constant>GLX_SLOW_CONFIG</constant>
393
                        is specified, then only slow frame buffer configurations will be considered; if
394
                        <constant>GLX_NON_CONFORMANT_CONFIG</constant> is specified, then only
395
                        nonconformant frame buffer configurations will be considered.
396
                        The default value is <constant>GLX_DONT_CARE</constant>.
397
                    </para>
398
                </listitem>
399
            </varlistentry>
400
            <varlistentry>
401
                <term><constant>GLX_TRANSPARENT_TYPE</constant></term>
402
                <listitem>
403
                    <para>
404
                    </para>
405
                    <para>
406
                        Must be followed by one of
407
                        <constant>GLX_NONE</constant>,
408
                        <constant>GLX_TRANSPARENT_RGB</constant>,
409
                        <constant>GLX_TRANSPARENT_INDEX</constant>.
410
                        If <constant>GLX_NONE</constant> is specified, then only opaque
411
                        frame buffer configurations will be considered; if <constant>GLX_TRANSPARENT_RGB</constant>
412
                        is specified, then only transparent
413
                        frame buffer configurations that support RGBA rendering will be considered;
414
                        if <constant>GLX_TRANSPARENT_INDEX</constant> is specified,
415
                        then only transparent frame buffer configurations that support color
416
                        index rendering will be considered.
417
                        The default value is <constant>GLX_NONE</constant>.
418
                    </para>
419
                </listitem>
420
            </varlistentry>
421
            <varlistentry>
422
                <term><constant>GLX_TRANSPARENT_INDEX_VALUE</constant></term>
423
                <listitem>
424
                    <para>
425
                    </para>
426
                    <para>
427
                        Must be followed by an integer value indicating the transparent
428
                        index value; the value must be between 0 and the maximum
429
                        frame buffer value for indices.
430
                        Only frame buffer configurations that use the
431
                        specified transparent index value will be considered.
432
                        The default value is <constant>GLX_DONT_CARE</constant>.
433
                        This attribute is ignored unless <constant>GLX_TRANSPARENT_TYPE</constant> is
434
                        included in <parameter>attrib_list</parameter> and specified as <constant>GLX_TRANSPARENT_INDEX</constant>.
435
                    </para>
436
                </listitem>
437
            </varlistentry>
438
            <varlistentry>
439
                <term><constant>GLX_TRANSPARENT_RED_VALUE</constant></term>
440
                <listitem>
441
                    <para>
442
                    </para>
443
                    <para>
444
                        Must be followed by an integer value indicating the transparent
445
                        red value; the value must be between 0 and the maximum
446
                        frame buffer value for red.
447
                        Only frame buffer configurations that use the
448
                        specified transparent red value will be considered.
449
                        The default value is <constant>GLX_DONT_CARE</constant>.
450
                        This attribute is
451
                        ignored unless <constant>GLX_TRANSPARENT_TYPE</constant> is included in
452
                        <parameter>attrib_list</parameter> and specified as <constant>GLX_TRANSPARENT_RGB</constant>.
453
                    </para>
454
                </listitem>
455
            </varlistentry>
456
            <varlistentry>
457
                <term><constant>GLX_TRANSPARENT_GREEN_VALUE</constant></term>
458
                <listitem>
459
                    <para>
460
                    </para>
461
                    <para>
462
                        Must be followed by an integer value indicating the transparent
463
                        green value; the value must be between 0 and the maximum
464
                        frame buffer value for green.
465
                        Only frame buffer configurations that use the
466
                        specified transparent green value will be considered.
467
                        The default value is <constant>GLX_DONT_CARE</constant>.
468
                        This attribute is
469
                        ignored unless <constant>GLX_TRANSPARENT_TYPE</constant> is included in
470
                        <parameter>attrib_list</parameter> and specified as <constant>GLX_TRANSPARENT_RGB</constant>.
471
                    </para>
472
                </listitem>
473
            </varlistentry>
474
            <varlistentry>
475
                <term><constant>GLX_TRANSPARENT_BLUE_VALUE</constant></term>
476
                <listitem>
477
                    <para>
478
                    </para>
479
                    <para>
480
                        Must be followed by an integer value indicating the transparent
481
                        blue value; the value must be between 0 and the maximum
482
                        frame buffer value for blue.
483
                        Only frame buffer configurations that use the
484
                        specified transparent blue value will be considered.
485
                        The default value is <constant>GLX_DONT_CARE</constant>.
486
                        This attribute is ignored unless <constant>GLX_TRANSPARENT_TYPE</constant> is included in
487
                        <parameter>attrib_list</parameter> and specified as <constant>GLX_TRANSPARENT_RGB</constant>.
488
                    </para>
489
                </listitem>
490
            </varlistentry>
491
            <varlistentry>
492
                <term><constant>GLX_TRANSPARENT_ALPHA_VALUE</constant></term>
493
                <listitem>
494
                    <para>
495
                    </para>
496
                    <para>
497
                        Must be followed by an integer value indicating the transparent
498
                        alpha value; the value must be between 0 and the maximum
499
                        frame buffer value for alpha.
500
                        Only frame buffer configurations that use the
501
                        specified transparent alpha value will be considered.
502
                        The default value is <constant>GLX_DONT_CARE</constant>.
503
                    </para>
504
                </listitem>
505
            </varlistentry>
506
        </variablelist>
507
        <para>
508
            When more than one GLX frame buffer configuration matches the specified attributes,
509
            a list of matching configurations is returned. The list is sorted
510
            according to the following precedence rules, which are applied in ascending
511
            order (i.e., configurations
512
            that are considered equal by a lower numbered rule are sorted by the higher
513
            numbered rule):
514
        </para>
515
        <variablelist>
516
            <varlistentry>
517
                <term>1.</term>
518
                <listitem>
519
                    <para>
520
                        By <constant>GLX_CONFIG_CAVEAT</constant> where the precedence is <constant>GLX_NONE</constant>,
521
                        <constant>GLX_SLOW_CONFIG</constant>, and <constant>GLX_NON_CONFORMANT_CONFIG</constant>.
522
                    </para>
523
                </listitem>
524
            </varlistentry>
525
            <varlistentry>
526
                <term>2.</term>
527
                <listitem>
528
                    <para>
529
                         Larger total number of RGBA color components
530
                        (<constant>GLX_RED_SIZE</constant>, <constant>GLX_GREEN_SIZE</constant>, <constant>GLX_BLUE_SIZE</constant>,
531
                        plus <constant>GLX_ALPHA_SIZE</constant>)
532
                        that have higher number of bits. If the requested number of bits in
533
                        <parameter>attrib_list</parameter> is zero or <constant>GLX_DONT_CARE</constant> for a particular color
534
                        component, then the number of bits for that component is not considered.
535
                    </para>
536
                </listitem>
537
            </varlistentry>
538
            <varlistentry>
539
                <term>3.</term>
540
                <listitem>
541
                    <para>
542
                        Smaller <constant>GLX_BUFFER_SIZE</constant>.
543
                    </para>
544
                </listitem>
545
            </varlistentry>
546
            <varlistentry>
547
                <term>4.</term>
548
                <listitem>
549
                    <para>
550
                        Single buffered configuration (<constant>GLX_DOUBLEBUFFER</constant> being
551
                        <constant>False</constant> precedes a double buffered one.
552
                    </para>
553
                </listitem>
554
            </varlistentry>
555
            <varlistentry>
556
                <term>5.</term>
557
                <listitem>
558
                    <para>
559
                        Smaller <constant>GLX_AUX_BUFFERS</constant>.
560
                    </para>
561
                </listitem>
562
            </varlistentry>
563
            <varlistentry>
564
                <term>6.</term>
565
                <listitem>
566
                    <para>
567
                        Larger <constant>GLX_DEPTH_SIZE</constant>.
568
                    </para>
569
                </listitem>
570
            </varlistentry>
571
            <varlistentry>
572
                <term>7.</term>
573
                <listitem>
574
                    <para>
575
                        Smaller <constant>GLX_STENCIL_SIZE</constant>.
576
                    </para>
577
                </listitem>
578
            </varlistentry>
579
            <varlistentry>
580
                <term>8.</term>
581
                <listitem>
582
                    <para>
583
                        Larger total number of accumulation buffer color components
584
                        (<constant>GLX_ACCUM_RED_SIZE</constant>, <constant>GLX_ACCUM_GREEN_SIZE</constant>,
585
                        <constant>GLX_ACCUM_BLUE_SIZE</constant>, plus <constant>GLX_ACCUM_ALPHA_SIZE</constant>) that have
586
                        higher number of bits. If the requested number of bits in <parameter>attrib_list</parameter> is
587
                        zero or <constant>GLX_DONT_CARE</constant> for a particular color component, then the
588
                        number of bits for that component is not considered.
589
                    </para>
590
                </listitem>
591
            </varlistentry>
592
            <varlistentry>
593
                <term>9.</term>
594
                <listitem>
595
                    <para>
596
                        By <constant>GLX_X_VISUAL_TYPE</constant> where the precedence order is
597
                        <constant>GLX_TRUE_COLOR</constant>, <constant>GLX_DIRECT_COLOR</constant>, <constant>GLX_PSEUDO_COLOR</constant>,
598
                        <constant>GLX_STATIC_COLOR</constant>, <constant>GLX_GRAY_SCALE</constant>, <constant>GLX_STATIC_GRAY</constant>.
599
                    </para>
600
                </listitem>
601
            </varlistentry>
602
        </variablelist>
603
    </refsect1>
604
    <refsect1 id="examples"><title>Examples</title>
605
        <para>
606
        </para>
607
        <variablelist>
608
            <varlistentry>
609
                <term><parameter>attrib_list</parameter> =</term>
610
                <listitem>
611
                    <para>
612
                        {<constant>GLX_RENDER_TYPE</constant>, <constant>GLX_RGBA_BIT</constant>,
613
                        <constant>GLX_RED_SIZE</constant>, 4,
614
                        <constant>GLX_GREEN_SIZE</constant>, 4,
615
                        <constant>GLX_BLUE_SIZE</constant>, 4,
616
                        <constant>None</constant>};
617
                    </para>
618
                </listitem>
619
            </varlistentry>
620
        </variablelist>
621
        <para>
622
            Specifies a frame buffer configuration that supports RGBA rendering
623
            and exists in the normal frame buffer,
624
            not an overlay or underlay buffer.
625
            The returned visual supports at least four bits each of red,
626
            green, and blue,
627
            and possibly no bits of alpha.
628
            It does not support stereo display.
629
            It may or may not have one or more auxiliary color buffers,
630
            a back buffer,
631
            a depth buffer,
632
            a stencil buffer,
633
            or an accumulation buffer.
634
        </para>
635
    </refsect1>
636
    <refsect1 id="notes"><title>Notes</title>
637
        <para>
638
            <function>glXChooseFBConfig</function> is available only if the GLX version is 1.3 or greater.
639
        </para>
640
        <para>
641
            If the GLX version is 1.1 or 1.0, the GL version must be 1.0.
642
            If the GLX version is 1.2, then the GL version must be 1.1.
643
            If the GLX version is 1.3, then the GL version must be 1.2.
644
        </para>
645
        <para>
646
            <citerefentry><refentrytitle>glXGetFBConfigs</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glXGetFBConfigAttrib</refentrytitle></citerefentry> can
647
            be used to implement selection algorithms other than the generic
648
            one implemented by <function>glXChooseFBConfig</function>. Call <function>glXChooseFBConfig</function> to retrieve all the frame buffer configurations
649
            on a particular screen or, alternatively, all the frame buffer configurations with
650
            a particular set of attributes. Next, call <citerefentry><refentrytitle>glXGetFBConfigAttrib</refentrytitle></citerefentry>
651
            to retrieve additional attributes for the frame buffer configurations and then
652
            select between them.
653
        </para>
654
        <para>
655
            GLX implementations are strongly discouraged,
656
            but not proscribed,
657
            from changing the selection algorithm used by <function>glXChooseFBConfig</function>.
658
            Therefore, selections may change from release to release
659
            of the client-side library.
660
        </para>
661
    </refsect1>
662
    <refsect1 id="errors"><title>Errors</title>
663
        <para>
664
            <constant>NULL</constant> is returned if an undefined GLX attribute is
665
            encountered in <parameter>attrib_list</parameter>, if <parameter>screen</parameter> is invalid, or if <parameter>dpy</parameter> does
666
            not support the GLX extension.
667
        </para>
668
    </refsect1>
669
    <refsect1 id="seealso"><title>See Also</title>
670
        <para>
671
            <citerefentry><refentrytitle>glXGetFBConfigAttrib</refentrytitle></citerefentry>,
672
            <citerefentry><refentrytitle>glXGetFBConfigs</refentrytitle></citerefentry>,
673
            <citerefentry><refentrytitle>glXGetVisualFromFBConfig</refentrytitle></citerefentry>
674
        </para>
675
    </refsect1>
676
    <refsect1 id="Copyright"><title>Copyright</title>
677
        <para>
678
            Copyright <trademark class="copyright"></trademark> 1991-2006
679
            Silicon Graphics, Inc. This document is licensed under the SGI
680
            Free Software B License. For details, see
681
            <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
682
        </para>
683
    </refsect1>
684
</refentry>