Returns information about GLX FBConfigs.
OpenGL C bindings library: libGL.a
int glXGetFBConfigAttrib(Display *dpy,
GLXFBConfig config,
int Attribute,
int *Value)
The glXGetFBConfigAttrib subroutine sets the Value provided to the Attribute value of the specified GLX FBConfig. The glXGetFBConfigAttrib subroutine returns an error code if for any reason it is unsuccessful. If it is successful, 0 (zero) is returned.
The Attribute parameter can be one of the following:
Attribute | Definition | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GLX_FBCONFIG_ID | This attribute is the XID of the GLX FBConfig. | ||||||||||||||||
GLX_VISUAL_ID | This attribute is the XID of the X Visual associated with the GLX FBConfig. | ||||||||||||||||
GLX_BUFFER_SIZE | This attribute defines the number of bits per color buffer. For GLX FBConfigs that correspond to a PseudoColor or StaticColor visual, this is equal to the depth value reported in the X11 visual. For GLX FBConfigs that correspond to TrueColor or DirectColor visual, this is the sum of GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_BLUE_SIZE, and GLX_ALPHA_SIZE. | ||||||||||||||||
GLX_LEVEL | This attribute defines the frame buffer level of the visual. Level 0 is the default frame buffer. Positive levels correspond to frame buffers that overlay the default buffer; negative levels correspond to frame buffers that underlay the default buffer. | ||||||||||||||||
GLX_DOUBLEBUFFER | This attribute is True if color buffers exist in front/back pairs that can be swapped. Otherwise, it is False. | ||||||||||||||||
GLX_STEREO | This attribute is True if color buffers exist in left/right pairs. Otherwise, it is False. | ||||||||||||||||
GLX_AUX_BUFFERS | This attribute defines the number of auxiliary color buffers available. Zero indicates that no auxiliary color buffers exist. | ||||||||||||||||
GLX_RENDER_TYPE | This attribute indicates what type of GLX Context a drawable created with the corresponding GLX FBConfig can be bound to. The following bit settings can exist: | ||||||||||||||||
| |||||||||||||||||
GLX_RED_SIZE | This attribute defines the number of red bits stored in each color buffer. If the GLX_RGBA_BIT is not set in the GLX_RENDER_TYPE attribute, the GLX_RED_SIZE attribute is undefined. | ||||||||||||||||
GLX_GREEN_SIZE | This attribute defines the number of green bits stored in each color buffer. If the GLX_RGBA_BIT is not set in the GLX_RENDER_TYPE attribute, the GLX_GREEN_SIZE attribute is undefined. | ||||||||||||||||
GLX_BLUE_SIZE | This attribute defines the number of blue bits stored in each color buffer. If the GLX_RGBA_BIT is not set in the GLX_RENDER_TYPE attribute, the GLX_BLUE_SIZE attribute is undefined. | ||||||||||||||||
GLX_ALPHA_SIZE | This attribute defines the number of alpha bits stored in each color buffer. If the GLX_RGBA_BIT is not set in the GLX_RENDER_TYPE attribute, the GLX_ALPHA_SIZE attribute is undefined. | ||||||||||||||||
GLX_DEPTH_SIZE | This attribute defines the number of bits in the depth buffer. | ||||||||||||||||
GLX_STENCIL_SIZE | This attribute defines the number of bits in the stencil buffer. | ||||||||||||||||
GLX_ACCUM_RED_SIZE | This attribute defines the number of red bits stored in the accumulation buffer. | ||||||||||||||||
GLX_ACCUM_GREEN_SIZE | This attribute defines the number of green bits stored in the accumulation buffer. | ||||||||||||||||
GLX_ACCUM_BLUE_SIZE | This attribute defines the number of blue bits stored in the accumulation buffer. | ||||||||||||||||
GLX_ACCUM_ALPHA_SIZE | This attribute defines the number of alpha bits stored in the accumulation buffer. | ||||||||||||||||
GLX_DRAWABLE_TYPE | This attribute defines which GLX drawables are supported by the GLX FBConfig. The following bit settings can exist: | ||||||||||||||||
| |||||||||||||||||
GLX_X_RENDERABLE | This attribute indicates whether X can be used to render into a drawable created with the GLX FBConfig. This attribute is True is the GLX FBConfig supports GLX windows and/or pixmaps, otherwise it is False. | ||||||||||||||||
GLX_X_VISUAL_TYPE | This attribute defines the X visual type of the X visual associated with the GLX FBConfig. It can have one of the following values: | ||||||||||||||||
| |||||||||||||||||
GLX_CONFIG_CAVEAT | This attribute defines any problems that the GLX FBConfig may have: | ||||||||||||||||
| |||||||||||||||||
GLX_TRANSPARENT_TYPE | This attribute defines the type of transparency (if any) supported by the FBConfig. It can have the following values: | ||||||||||||||||
| |||||||||||||||||
GLX_TRANSPARENT_INDEX_VALUE | This attribute defines the index value of the transparent pixel when the transparency type is GLX_TRANSPARENT_INDEX. | ||||||||||||||||
GLX_TRANSPARENT_RED_VALUE | This attribute defines the red value of the transparent pixel when the transparency type is GLX_TRANSPARENT_RGB. | ||||||||||||||||
GLX_TRANSPARENT_GREEN_VALUE | This attribute defines the green value of the transparent pixel when the transparency type is GLX_TRANSPARENT_RGB | ||||||||||||||||
GLX_TRANSPARENT_BLUE_VALUE | This attribute defines the blue value of the transparent pixel when the transparency type is GLX_TRANSPARENT_RGB. | ||||||||||||||||
GLX_TRANSPARENT_ALPHA_VALUE | This attribute defines the alpha value of the transparent pixel when the transparency type is GLX_TRANSPARENT_RGB. | ||||||||||||||||
GLX_MAX_PBUFFER_WIDTH | This attribute defines the maximum width value that can be passed into glXCreatePbuffer. | ||||||||||||||||
GLX_MAX_PBUFFER_HEIGHT | This attribute defines the maximum height value that can be passed into glXCreatePbuffer. | ||||||||||||||||
GLX_MAX_PBUFFER_PIXELS | This attribute defines the maximum number of pixels (width times height) for a GLX Pbuffer. It can have a value that is less than the maximum width times the maximum height. Also, the value is static and assumes that no other pbuffers or X resources are contending for the framebuffer memory. Therefore, it may not be possible to allocate a pbuffer of the size given by this attribute. |
Although a GLX implementation can export many FBConfigs that support OpenGL rendering, it must export at least one FBConfig where the GLX_RENDER_TYPE attribute has the GLX_RGBA_BIT set and the GLX_CONFIG_CAVEAT must not be set to GLX_NON_CONFORMANT_CONFIG, Also, this FBConfig just 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. Auxillary buffers are optional and the alpha buffer may have 0 bits. The color buffer size of this FBConfig must be as large as that of the deepest TrueColor, DirectColor, PseudoColor, or StaticColor visual supported on framebuffer level 0.
An application is most effective when written to select the GLX FBConfig that most closely meeting its requirements. Creating GLX drawables with unnecessary buffers can result in reduced rendering performance and poor resource allocation.
dpy | Specifies the connection to the X server. |
config | Specifies the GLX FBConfig to be queried. |
Attribute | Specifies the GLX FBConfig attribute to be returned. |
Value | Returns the requested value. |
GLX_NO_EXTENSION | dpy does not support the GLX extension. |
GLX_BAD_ATTRIBUTE | Attribute is not a valid GLX attribute. |
GLX_BAD_VALUE | config is not a valid GLX FBConfig. |
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
/usr/include/GL/glx.h | Contains C language constants, variable type definitions, and ANSI function prototypes for GLX. |
The glXChooseFBConfig subroutine, glXCreateNewContext subroutine.
OpenGL in the AIXwindows (GLX) Environment.