Next | Prev | Up | Top | Contents | Index
Why Use the Framebuffer Configuration Extension?
Use this extension
- if you want to use pbuffers (see "The Pixel Buffer Extension")
- if you want to do RGBA rendering to a PseudoColor or GrayScale window
- instead of glXChooseVisual(), since it provides visual selection for all GLX drawables, including pbuffers, and incorporates the visual info and visual rating extensions.
This section briefly explores the three new features provided by the extension.
Describing a Drawable With a GLXFBConfig Construct
Currently GLX overloads X visuals so they have additional buffers and other characteristics needed for OpenGL rendering. This extension packages GLX drawables by defining a new construct, a GLXFBConfig, that encapsulates GLX drawable capabilities and has the following properties:
- It may or may not have an associated X visual. If it does have an associated X visual, then it is possible to create windows that have the capabilities described by the GLXFBConfig.
- A particular GLXFBConfig does not need to work with all GLX drawables. For example, it's possible for implementations to export GLXFBConfigs that work only with GLX pixmaps.
Less-Rigid Similarity Requirements When Matching Context and Drawable
In OpenGL 1.0, when you associate a drawable with a GLX context by calling glXMakeCurrent(), the two have to be "similar"; that is, they must have been created with the same visual. This extension relaxes the requirement; it only requires the context and drawable to be compatible. This is less restrictive and implies the following:
- The render_type attribute for the context must be supported by the GLXFBConfig that the drawable was created with. For example, if the context was created with render_type GLX_RGBA_TYPE_SGIX, then the GLX_RENDER_TYPE_SGIX attribute of the GLXFBConfig must have the GLX_RGBA_BIT_SGIX bit set.
- All color buffers and ancillary buffers that exist in both GLXFBConfigs must have the same size. For example, a GLX drawable that has a front left buffer and a back left buffer with red, green, and blue sizes of 4 is not compatible with a GLXFBConfig that has only a front left buffer with red, green, and blue sizes of 8. However, it is compatible with a GLXFBConfig that has only a front left buffer if the red, green, and blue sizes are 4.
Note that when a context is created, it has an associated rendering type: GLX_RGBA_TYPE_SGIX or GLX_COLOR_INDEX_TYPE_SGIX.
Less-Rigid Match of GLX Visual and X Visual
The current GLX specification requires that the GLX_RGBA visual attribute be associated only with TrueColor and DirectColor X visuals. This extension makes it possible to do RGBA rendering to windows created with visuals of type PseudoColor, StaticColor, GrayScale, and StaticGray. In each case, the red component is used to generate the display, and the green and blue components, if present, are ignored for display purposes.
The OpenGL RGBA rendering semantics are more powerful than the OpenGL index rendering semantics. By extending the X visual types that can be associated with an RGBA color buffer, this extension allows RGBA rendering semantics to be used with pseudo-color and gray-scale displays. A particularly useful application of this extension is support of one- and two-component RGBA drawables (a two-component visual has zero-size green and blue components; a one-component visual has, in addition, a zero-size alpha component).
Next | Prev | Up | Top | Contents | Index