GLXGETFBCONFIGATTRIB(3gl)GLXGETFBCONFIGATTRIB(3gl)NAME
glXGetFBConfigAttrib - return information about GLX fbconfigs
C SPECIFICATION
int glXGetFBConfigAttrib( Display *dpy,
GLXFBConfig config,
int attrib,
int *value )
PARAMETERS
dpy Specifies the connection to the X server.
config Specifies the configuration to be queried.
attrib Specifies the configuration attribute to be returned.
value Returns the requested value.
DESCRIPTION
glXGetFBConfigAttrib sets value to the attrib value from the specified
config. glXGetFBConfigAttrib returns an error code if it fails for any
reason. Otherwise, zero is returned.
attrib is one of the following:
GLX_FBCONFIG_ID X id of the GLXFBConfig.
GLX_BUFFER_SIZE Number of bits per color buffer. For RGBA visu‐
als, 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 corre‐
spond to frame buffers that overlay the default
buffer, and negative levels correspond to frame
buffers that underlay the default buffer.
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.
GLX_AUX_BUFFERS Number of auxiliary color buffers that are avail‐
able. Zero indicates that no auxiliary color
buffers exist.
GLX_RED_SIZE Number of bits of red stored in each color buf‐
fer.
GLX_GREEN_SIZE Number of bits of green stored in each color buf‐
fer.
GLX_BLUE_SIZE Number of bits of blue stored in each color buf‐
fer.
GLX_ALPHA_SIZE Number of bits of alpha stored in each color buf‐
fer.
GLX_DEPTH_SIZE Number of bits in the depth buffer.
GLX_STENCIL_SIZE Number of bits in the stencil buffer.
GLX_ACCUM_RED_SIZE Number of bits of red stored in the accumulation
buffer.
GLX_ACCUM_GREEN_SIZE Number of bits of green stored in the accumula‐
tion buffer.
GLX_ACCUM_BLUE_SIZE Number of bits of blue stored in the accumulation
buffer.
GLX_ACCUM_ALPHA_SIZE Number of bits of alpha stored in the accumula‐
tion buffer.
GLX_RENDER_TYPE Mask indicating which OpenGL rendering modes are
supported. Valid bits are GLX_RGBA_BIT,
GLX_COLOR_INDEX.
GLX_DRAWABLE_TYPE Mask indicating which GLX drawables are sup‐
ported. Valid bits are GLX_WINDOW_BIT,
GLX_PIXMAP_BIT and GLX_PBUFFER_BIT.
GLX_X_RENDERABLE True if X can render to drawable.
GLX_X_VISUAL_TYPE X visual type of the associated visual.
GLX_CONFIG_CAVEAT Description of the visual - should be GLX_NONE or
GLX_SLOW_VISUAL.
GLX_TRANSPARENT_TYPE Transparent type - should be GLX_NONE, GLX_TRANS‐
PARENT_RGB or GLX_TRANSPARENT_INDEX.
GLX_TRANSPARENT_INDEX_VALUE
Transparent index value.
GLX_TRANSPARENT_RED_VALUE
Transparent red value.
GLX_TRANSPARENT_GREEN_VALUE
Transparent green value.
GLX_TRANSPARENT_BLUE_VALUE
Transparent blue value.
GLX_TRANSPARENT_ALPHA_VALUE
Transparent alpha value.
GLX_MAX_PBUFFER_WIDTH Maximum width of the pbuffer supported.
GLX_MAX_PBUFFER_HEIGHT
Maximum height of the pbuffer supported.
GLX_MAX_PBUFFER_PIXELS
Maximum size of the pbuffer supported
GLX_VISUAL_ID Visual id of the corresponding visual
GLX_SAMPLE_BUFFERS Number of multisample buffers.
GLX_SAMPLES Number of samples stored in each multisample buf‐
fer.
GLX_VIDEO_RESIZE_SUN One is visual/fbconfig is capable of video resiz‐
ing; zero otherwise.
GLX_VIDEO_REFRESH_TIME_SUN
Number indicating video refresh time in microsec‐
onds.
GLX_GAMMA_VALUE_SUN Visual gamma correction value in percent (e.g. a
value of 180 means a gamma correction value of
1.80).
GLXFBConfig has an associated X visual if and only if the GLX_DRAW‐
ABLE_TYPE has the GLX_WINDOW_BIT or GLX_PIXMAP_BIT is set.
Although a GLX implementation can export many config that support GL
rendering, it must support at least one RGBA config. This config must
have at least one color buffer, a stencil buffer of at least 1 bit, a
depth buffer of at least 12 bits, and an accumulation buffer. Alpha
bitplanes are optional in this config. However, its color buffer size
must be as great as that of the deepest TrueColor, DirectColor, Pseudo‐
Color, or StaticColor visual supported on level zero, and it must
itself be made available on level zero.
Applications are best written to select the config that most closely
meets their requirements. Creating windows, GLX pixmaps or GLX
pbuffers with unnecessary buffers can result in reduced rendering per‐
formance as well as poor resource allocation.
NOTES
glXGetFBConfigAttrib is part of the GLX Version 1.3 command set. The
function is only valid if the connection supports GLX Version 1.3 or
later.
ERRORS
GLX_BAD_SCREEN is returned if the screen of vis does not correspond to
a screen.
GLX_BAD_ATTRIBUTE is returned if attrib is not a valid GLX attribute.
SEE ALSO
glXChooseVisual, glXGetConfig, glXCreateNewContext, glXCreatePixmap,
glXChooseFBConfig, glXGetFBConfigFromVisual, glXCreatePbuffer, glXDe‐
stroyPbuffer, glXQueryDrawable
17 May 01 GLXGETFBCONFIGATTRIB(3gl)