1GLXGETCONFIG(3G) OpenGL Manual GLXGETCONFIG(3G)
2
3
4
6 glXGetConfig - return information about GLX visuals
7
9 int glXGetConfig(Display * dpy, XVisualInfo * vis, int attrib,
10 int * value);
11
13 dpy
14 Specifies the connection to the X server.
15
16 vis
17 Specifies the visual to be queried. It is a pointer to an
18 XVisualInfo structure, not a visual ID or a pointer to a Visual.
19
20 attrib
21 Specifies the visual attribute to be returned.
22
23 value
24 Returns the requested value.
25
27 glXGetConfig sets value to the attrib value of windows or GLX pixmaps
28 created with respect to vis. glXGetConfig returns an error code if it
29 fails for any reason. Otherwise, zero is returned.
30
31 attrib is one of the following:
32
33 GLX_USE_GL
34 True if OpenGL rendering is supported by this visual, False
35 otherwise.
36
37 GLX_BUFFER_SIZE
38 Number of bits per color buffer. For RGBA visuals, GLX_BUFFER_SIZE
39 is the sum of GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_BLUE_SIZE, and
40 GLX_ALPHA_SIZE. For color index visuals, GLX_BUFFER_SIZE is the
41 size of the color indexes.
42
43 GLX_LEVEL
44 Frame buffer level of the visual. Level zero is the default frame
45 buffer. Positive levels correspond to frame buffers that overlay
46 the default buffer, and negative levels correspond to frame buffers
47 that underlay the default buffer.
48
49 GLX_RGBA
50 True if color buffers store red, green, blue, and alpha values.
51 False if they store color indexes.
52
53 GLX_DOUBLEBUFFER
54 True if color buffers exist in front/back pairs that can be
55 swapped, False otherwise.
56
57 GLX_STEREO
58 True if color buffers exist in left/right pairs, False otherwise.
59
60 GLX_AUX_BUFFERS
61 Number of auxiliary color buffers that are available. Zero
62 indicates that no auxiliary color buffers exist.
63
64 GLX_RED_SIZE
65 Number of bits of red stored in each color buffer. Undefined if
66 GLX_RGBA is False.
67
68 GLX_GREEN_SIZE
69 Number of bits of green stored in each color buffer. Undefined if
70 GLX_RGBA is False.
71
72 GLX_BLUE_SIZE
73 Number of bits of blue stored in each color buffer. Undefined if
74 GLX_RGBA is False.
75
76 GLX_ALPHA_SIZE
77 Number of bits of alpha stored in each color buffer. Undefined if
78 GLX_RGBA is False.
79
80 GLX_DEPTH_SIZE
81 Number of bits in the depth buffer.
82
83 GLX_STENCIL_SIZE
84 Number of bits in the stencil buffer.
85
86 GLX_ACCUM_RED_SIZE
87 Number of bits of red stored in the accumulation buffer.
88
89 GLX_ACCUM_GREEN_SIZE
90 Number of bits of green stored in the accumulation buffer.
91
92 GLX_ACCUM_BLUE_SIZE
93 Number of bits of blue stored in the accumulation buffer.
94
95 GLX_ACCUM_ALPHA_SIZE
96 Number of bits of alpha stored in the accumulation buffer.
97
98 The X protocol allows a single visual ID to be instantiated with
99 different numbers of bits per pixel. Windows or GLX pixmaps that will
100 be rendered with OpenGL, however, must be instantiated with a color
101 buffer depth of GLX_BUFFER_SIZE.
102
103 Although a GLX implementation can export many visuals that support GL
104 rendering, it must support at least one RGBA visual. This visual must
105 have at least one color buffer, a stencil buffer of at least 1 bit, a
106 depth buffer of at least 12 bits, and an accumulation buffer. Alpha
107 bitplanes are optional in this visual. However, its color buffer size
108 must be as great as that of the deepest TrueColor, DirectColor,
109 PseudoColor, or StaticColor visual supported on level zero, and it must
110 itself be made available on level zero.
111
112 In addition, if the X server exports a PseudoColor or StaticColor
113 visual on framebuffer level 0, a color index visual is also required on
114 that level. It must have at least one color buffer, a stencil buffer of
115 at least 1 bit, and a depth buffer of at least 12 bits. This visual
116 must have as many color bitplanes as the deepest PseudoColor or
117 StaticColor visual supported on level 0.
118
119 Applications are best written to select the visual that most closely
120 meets their requirements. Creating windows or GLX pixmaps with
121 unnecessary buffers can result in reduced rendering performance as well
122 as poor resource allocation.
123
125 XVisualInfo is defined in Xutil.h. It is a structure that includes
126 visual, visualID, screen, and depth elements.
127
129 GLX_NO_EXTENSION is returned if dpy does not support the GLX extension.
130
131 GLX_BAD_SCREEN is returned if the screen of vis does not correspond to
132 a screen.
133
134 GLX_BAD_ATTRIBUTE is returned if attrib is not a valid GLX attribute.
135
136 GLX_BAD_VISUAL is returned if vis doesn't support GLX and an attribute
137 other than GLX_USE_GL is requested.
138
140 glXChooseVisual(), glXCreateContext()
141
143 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
144 under the SGI Free Software B License. For details, see
145 http://oss.sgi.com/projects/FreeB/.
146
148 opengl.org
149
150
151
152opengl.org 06/10/2014 GLXGETCONFIG(3G)