1GLXGETCONFIG()                                                  GLXGETCONFIG()
2
3
4

NAME

6       glXGetConfig - return information about GLX visuals
7
8

C SPECIFICATION

10       int glXGetConfig( Display *dpy,
11                         XVisualInfo *vis,
12                         int attrib,
13                         int *value )
14
15       delim $$
16

PARAMETERS

18       dpy     Specifies the connection to the X server.
19
20       vis     Specifies the visual to be queried.  It is a pointer to an XVi‐
21               sualInfo structure, not a visual ID or a pointer to a Visual.
22
23       attrib  Specifies the visual attribute to be returned.
24
25       value   Returns the requested value.
26

DESCRIPTION

28       glXGetConfig sets value to the attrib value of windows or  GLX  pixmaps
29       created  with respect to vis.  glXGetConfig returns an error code if it
30       fails for any reason.  Otherwise, zero is returned.
31
32       attrib is one of the following:
33
34       GLX_USE_GL            True if OpenGL rendering  is  supported  by  this
35                             visual, False otherwise.
36
37       GLX_BUFFER_SIZE       Number  of bits per color buffer.  For RGBA visu‐
38                             als, GLX_BUFFER_SIZE is the sum of  GLX_RED_SIZE,
39                             GLX_GREEN_SIZE,         GLX_BLUE_SIZE,        and
40                             GLX_ALPHA_SIZE.    For   color   index   visuals,
41                             GLX_BUFFER_SIZE is the size of the color indexes.
42
43       GLX_LEVEL             Frame  buffer level of the visual.  Level zero is
44                             the default frame buffer.  Positive levels corre‐
45                             spond  to  frame buffers that overlay the default
46                             buffer, and negative levels correspond  to  frame
47                             buffers that underlay the default buffer.
48
49       GLX_RGBA              True if color buffers store red, green, blue, and
50                             alpha values.  False if they store color indexes.
51
52       GLX_DOUBLEBUFFER      True if color buffers exist in  front/back  pairs
53                             that can be swapped, False otherwise.
54
55       GLX_STEREO            True  if color buffers exist in left/right pairs,
56                             False otherwise.
57
58       GLX_AUX_BUFFERS       Number of auxiliary color buffers that are avail‐
59                             able.   Zero  indicates  that  no auxiliary color
60                             buffers exist.
61
62       GLX_RED_SIZE          Number of bits of red stored in each  color  buf‐
63                             fer.  Undefined if GLX_RGBA is False.
64
65       GLX_GREEN_SIZE        Number of bits of green stored in each color buf‐
66                             fer.  Undefined if GLX_RGBA is False.
67
68       GLX_BLUE_SIZE         Number of bits of blue stored in each color  buf‐
69                             fer.  Undefined if GLX_RGBA is False.
70
71       GLX_ALPHA_SIZE        Number of bits of alpha stored in each color buf‐
72                             fer.  Undefined if GLX_RGBA is False.
73
74       GLX_DEPTH_SIZE        Number of bits in the depth buffer.
75
76       GLX_STENCIL_SIZE      Number of bits in the stencil buffer.
77
78       GLX_ACCUM_RED_SIZE    Number of bits of red stored in the  accumulation
79                             buffer.
80
81       GLX_ACCUM_GREEN_SIZE  Number  of  bits of green stored in the accumula‐
82                             tion buffer.
83
84       GLX_ACCUM_BLUE_SIZE   Number of bits of blue stored in the accumulation
85                             buffer.
86
87       GLX_ACCUM_ALPHA_SIZE  Number  of  bits of alpha stored in the accumula‐
88                             tion buffer.
89
90       The X protocol allows a single visual ID to be instantiated  with  dif‐
91       ferent  numbers of bits per pixel.  Windows or GLX pixmaps that will be
92       rendered with OpenGL, however, must be instantiated with a color buffer
93       depth of GLX_BUFFER_SIZE.
94
95       Although  a  GLX implementation can export many visuals that support GL
96       rendering, it must support at least one RGBA visual. This  visual  must
97       have  at  least one color buffer, a stencil buffer of at least 1 bit, a
98       depth buffer of at least 12 bits, and an  accumulation  buffer.   Alpha
99       bitplanes  are optional in this visual.  However, its color buffer size
100       must be as great as that of the deepest TrueColor, DirectColor, Pseudo‐
101       Color,  or  StaticColor  visual  supported  on  level zero, and it must
102       itself be made available on level zero.
103
104       In addition, if the X server exports a PseudoColor or StaticColor  vis‐
105       ual  on  framebuffer  level 0, a color index visual is also required on
106       that level.  It must have at least one color buffer, a  stencil  buffer
107       of at least 1 bit, and a depth buffer of at least 12 bits.  This visual
108       must have as many color bitplanes as the deepest PseudoColor or Static‐
109       Color visual supported on level 0.
110
111       Applications  are  best  written to select the visual that most closely
112       meets their requirements.  Creating windows or GLX pixmaps with  unnec‐
113       essary  buffers  can result in reduced rendering performance as well as
114       poor resource allocation.
115

NOTES

117       XVisualInfo is defined in Xutil.h.  It is  a  structure  that  includes
118       visual, visualID, screen, and depth elements.
119

ERRORS

121       GLX_NO_EXTENSION is returned if dpy does not support the GLX extension.
122
123       GLX_BAD_SCREEN  is returned if the screen of vis does not correspond to
124       a screen.
125
126       GLX_BAD_ATTRIBUTE is returned if attrib is not a valid GLX attribute.
127
128       GLX_BAD_VISUAL is returned if vis doesn't support GLX and an  attribute
129       other than GLX_USE_GL is requested.
130

SEE ALSO

132       glXChooseVisual, glXCreateContext
133
134
135
136
137                                                                GLXGETCONFIG()
Impressum