G
glXGetConfig
Chapter 7
188
glXGetConfig
glXGetConfig: return information about GLX visuals.
C Specification
int glXGetConfig(
Display *dpy,
XVisualInfo *vis,
int attrib,
int *value)
Parameters
dpy Specifies the connection to the X server.
vis Specifies the visual to be queried. It is a pointer to an XVisualInfo
structure, not a visual ID or a pointer to a Visual.
attrib Specifies the visual attribute to be returned. value Returns the
requested value.
Description
glXGetConfig sets value to the attrib value of windows or GLX pixmaps created with
respect to vis. glXGetConfig returns anerror code if it fails for an reason. Otherwise, zero
is returned.
attrib is one of the following:
GLX_USE_GL
True if OpenGL rendering is supported by this visual, False otherwise.
GLX_BUFFER_SIZE
Number of bits per color buffer. For RGBA visuals, GLX_BUFFER_SIZE is the sum of
GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_BLUE_SIZE, and GLX_ALPHA_SIZE. For
color index visuals, GLX_BUFFER_SIZE is the size of the color indexes.
GLX_LEVEL
Frame buffer level of the visual. Level zero is the default frame buffer. Positive levels
correspond to frame buffers that overlay the default buffer, and negative levels
correspond to frame buffers that underlay the default buffer.
GLX_RGBA
True if color buffers store red, green, blue, and alpha values. False if they store color
indexes.
GLX_DOUBLEBUFFER
True if color buffers exist in front/back pairs that can be swapped, False otherwise.
GLX_STEREO
True if color buffers exist in left/right pairs, False otherwise.