home *** CD-ROM | disk | FTP | other *** search
- Name
-
- EXT_visual_info
-
- Name Strings
-
- GL_EXT_visual_info
- GLX_EXT_visual_info
-
- Version
-
- $Date: 1995/09/30 02:33:47 $ $Revision: 1.1 $
-
- Number
-
- 28
-
- Dependencies
-
- SGIS_multisample affects the definition of this extension
-
- Overview
-
- The current GLX specification requires that RGBA extended visuals be
- associated only with X visual types TrueColor and DirectColor. This
- extension defines the semantics of associating a GLX RGBA visual with
- four other X visual types: PseudoColor, StaticColor, GrayScale, and
- StaticGray. In each of these cases, the red component is used to
- generate the display, and the green and blue components, if present,
- are ignored for display purposes. Provision is made for a GLX
- application to determine which X visual type is associated with a
- GLX visual, and to specify which X visual type is desired, when using
- glXChooseVisual.
-
- The OpenGL RGBA rendering semantics are more powerful than the OpenGL
- index rendering semantics. By extending the number of X visual types
- that can be associated with an RGBA color buffer, this extension allows
- RGBA rendering semantics to be used with color index and gray scale
- displays. An especially useful application of this extension is
- support of one- and two-component RGBA visuals; visuals whose green,
- blue, and sometimes alpha components have no bitplanes.
-
- This extension also allows GLX index visuals to be associated with
- X visual types GrayScale and StaticGray.
-
- In addition, this extension also provides a means to request a visual
- with a transparent pixel and to query whether a visual supports a
- transparent pixel value and the value of the transparent pixel.
- Note that the notion of level and transparent pixels are orthogonal as
- both layer 1 and layer 0 visuals may or may not have a transparent pixel
- value.
-
- New Procedures and Functions
-
- None
-
- New Tokens
-
- Accepted by the <attrib> parameter of glXGetConfig, and by the
- <attrib_list> parameter of glXChooseVisual:
-
- GLX_X_VISUAL_TYPE_EXT 0x22
- GLX_TRANSPARENT_PIXEL_EXT 0x23
- GLX_TRANSPARENT_COLOR_EXT 0x24
- GLX_TRANSPARENT_INDEX_EXT 0x25
-
-
- Returned by glXGetConfig, and accepted by the <attrib_list>
- parameter of glXChooseVisual (following the GLX_X_VISUAL_TYPE_EXT
- token):
-
- GLX_TRUE_COLOR_EXT 0x1
- GLX_DIRECT_COLOR_EXT 0x2
- GLX_PSEUDO_COLOR_EXT 0x3
- GLX_STATIC_COLOR_EXT 0x4
- GLX_GRAY_SCALE_EXT 0x5
- GLX_STATIC_GRAY_EXT 0x6
-
- Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
-
- None
-
- Additions to Chapter 3 of the 1.0 Specification (Rasterization)
-
- None
-
- Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations and
- the Framebuffer)
-
- In section 4.1.6 (Blending) follow the sentence "If a color buffer has
- no A value, then it is as if the destination A value is 1." with the
- sentence "If the color buffer has no R, G, or B value, then it is as
- if the destination R, G, or B value is 0."
-
- In section 4.3.2 (Reading Pixels) follow the sentence "If the framebuffer
- does not support alpha values then the A that is obtained is 1.0." with
- the sentence "If the framebuffer does not support red, green, or blue
- values, then the R, G or B that is obtained is 0.0."
-
- Additions to Chapter 5 of the 1.0 Specification (Special Functions)
-
- None
-
- Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
-
- None
-
- Additions to the GLX Specification
-
- The X visual type of a GLX visual can be queried using glXGetConfig().
-
- Attribute Type Notes
- --------- ---- -----
- GLX_USE_GL boolean True if OpenGL rendering is supported
- GLX_BUFFER_SIZE integer depth of the color buffer
- GLX_LEVEL integer frame buffer level
- GLX_RGBA boolean True if in RGBA mode, False if color index
- GLX_DOUBLEBUFFER boolean True if color buffers have front/back pairs
- GLX_STEREO boolean True if color buffers have left/right pairs
- GLX_AUX_BUFFERS integer number of auxiliary color buffers
- GLX_RED_SIZE integer number of bits of Red if in RGB mode
- GLX_GREEN_SIZE integer number of bits of Green if in RGB mode
- GLX_BLUE_SIZE integer number of bits of Blue if in RGB mode
- GLX_ALPHA_SIZE integer number of bits of Alpha if in RGB mode
- GLX_DEPTH_SIZE integer number of bits in the depth buffer
- GLX_STENCIL_SIZE integer number of bits in the stencil buffer
- GLX_ACCUM_RED_SIZE integer number of bits of Red in the accumulation buffer
- GLX_ACCUM_GREEN_SIZE integer number of bits of Green in the accumulation buffer
- GLX_ACCUM_BLUE_SIZE integer number of bits of Blue in the accumulation buffer
- GLX_ACCUM_ALPHA_SIZE integer number of bits of Alpha in the accumulation buffer
- GLX_SAMPLE_BUFFERS_SGIS integer number of multisample buffers
- GLX_SAMPLES_SGIS integer number of samples stored in each multisample buffer
- GLX_X_VISUAL_TYPE_EXT integer X visual type of the GLX visual
- GLX_TRANSPARENT_PIXEL_EXT boolean True if the visual contains a transparent pixel
- GLX_TRANSPARENT_INDEX_EXT integer transparent index value.
- GLX_TRANSPARENT_COLOR_EXT color*4 transparent color value (RGBA).
-
- type color is essentially the OpenGL signed integer color type which
- maps to an OpenGL float color in the range (0.0,1.0) as described
- in table 2.4 of the 1.0 OpenGL specification.
-
- Table 1: Configuration attributes
-
- glXGetConfig returns one of the values in table 2 (below) when called
- with attribute name GLX_X_VISUAL_TYPE_EXT.
-
- GLX token name X Visual Type
- -------------- -------------
- GLX_TRUE_COLOR_EXT TrueColor
- GLX_DIRECT_COLOR_EXT DirectColor
- GLX_PSEUDO_COLOR_EXT PseudoColor
- GLX_STATIC_COLOR_EXT StaticColor
- GLX_GRAY_SCALE_EXT GrayScale
- GLX_STATIC_GRAY_EXT StaticGray
-
- Table 2: X visual type token values
-
- Replace the GLX specification discussion of glXChooseVisual with
- the following text:
-
- glXChooseVisual is used to find a visual that matches the client's
- specified attributes.
-
- XVisualInfo* glXChooseVisual( Display *dpy, int screen,
- int *attrib_list );
-
- glXChooseVisual returns a pointer to an XVisualInfo structure
- describing the visual that best meets a minimum specification. The
- boolean GLX attributes of the visual that is returned will match the
- specification exactly. The integer GLX attributes will meet or exceed
- the specified minimum values. The enumerated GLX attributes are
- matched in an attribute-specific manner. If no conforming visual
- exists, NULL is returned.
-
- If GLX_RGBA is in <attrib_list> then the resulting visual will be of type
- RGBA, meaning that it has up to four color components, and that OpenGL
- renders to it using its RGBA semantics. RGBA visuals may have any
- of the six X Visual types: TrueColor, DirectColor, PseudoColor,
- StaticColor, GrayScale, and StaticGray. The enumerated attribute
- GLX_X_VISUAL_TYPE_EXT specifies which X visual type is required
- for the requested GLX visual. In attrib_list it is followed by one
- of six possible values, indicating which X visual type is required.
-
- GLX token name X Visual Type
- -------------- -------------
- GLX_TRUE_COLOR_EXT TrueColor
- GLX_DIRECT_COLOR_EXT DirectColor
- GLX_PSEUDO_COLOR_EXT PseudoColor
- GLX_STATIC_COLOR_EXT StaticColor
- GLX_GRAY_SCALE_EXT GrayScale
- GLX_STATIC_GRAY_EXT StaticGray
-
- If GLX_X_VISUAL_TYPE_EXT is not included in <attrib_list>, only
- visuals with X visual type TrueColor and DirectColor are considered
- for return. If all other attributes are equivalent, then a
- TrueColor visual will be chosen in preference to a DirectColor
- visual. X visual types PseudoColor, StaticColor, GrayScale, and
- StaticGray generate their display values using only the red
- component of the framebuffer. X visual types TrueColor and
- DirectColor generate their red, green, and blue display values from
- the red, green, and blue framebuffer components.
-
- If GLX_RGBA is not in <attrib_list> then the resulting visual will be
- of type index, meaning that it has only a single index value, and that
- OpenGL renders to it using its color index semantics. The enumerated
- attribute GLX_X_VISUAL_TYPE_EXT specifies which X visual type is
- required for the requested GLX visual. In <attrib_list> it is
- followed by one of four possible values, indicating which X visual
- type is required.
-
- GLX token name X Visual Type
- -------------- -------------
- GLX_PSEUDO_COLOR_EXT PseudoColor
- GLX_STATIC_COLOR_EXT StaticColor
- GLX_GRAY_SCALE_EXT GrayScale
- GLX_STATIC_GRAY_EXT StaticGray
-
- If GLX_X_VISUAL_TYPE_EXT is not included in <attrib_list>, only
- visuals with X visual type PseudoColor and StaticColor are considered
- for return. If all other attributes are equivalent, then a
- PseudoColor visual will be chosen in preference to a StaticColor
- visual.
-
- All boolean GLX attributes default to False except GLX_USE_GL, which
- defaults to True. All integer attributes default to zero.
-
- Default specifications are superseded by the attributes included in
- <attrib_list>. Integer attributes are immediately followed by the
- corresponding desired value. Boolean attributes appearing in
- <attrib_list> have an implicit True value; such attributes are never
- followed by an explicit True or False value. The list is terminated
- with None.
-
- To free the data returned, use XFree().
-
- NULL is returned if an undefined GLX attribute is encountered, or
- if an unacceptable enumerated attribute value is encountered.
-
- GLX Protocol
-
- Six new property type/property value pairs are included in the property
- list of each visual returned by glXGetVisualConfigs. The property type/property
- value pairs are encoded as
-
- 4 ENUM property type
- 0x22 GLX_X_VISUAL_TYPE_EXT
- 4 ENUM property value
- 0x1 GLX_TRUE_COLOR_EXT
- 0x2 GLX_DIRECT_COLOR_EXT
- 0x3 GLX_PSEUDO_COLOR_EXT
- 0x4 GLX_STATIC_COLOR_EXT
- 0x5 GLX_GRAY_SCALE_EXT
- 0x6 GLX_STATIC_GRAY_EXT
-
- 4 ENUM property type
- 0x23 GLX_TRANSPARENT_PIXEL_EXT
- 4 BOOL32 property value
-
- 4 ENUM property type
- 0x24 GLX_TRANSPARENT_INDEX_EXT
- 4 BOOL32 property value
-
- 4 ENUM property type
- 0x25 GLX_TRANSPARENT_RED_VALUE
- 4 INT32 property value
-
- 4 ENUM property type
- 0x26 GLX_TRANSPARENT_GREEN_VALUE
- 4 INT32 property value
-
- 4 ENUM property type
- 0x27 GLX_TRANSPARENT_BLUE_VALUE
- 4 INT32 property value
-
-
- Dependencies on SGIS_multisample
-
- If SGIS_multisample is not supported, references to
- GLX_SAMPLE_BUFFERS_SGIS and GLX_SAMPLES_SGIS in this document are
- invalid and should be ignored.
-
- Errors
-
- None
-
- New State
-
- None
-
- New Implementation Dependent State
-
- Get Value Get Command Type
- --------- ----------- ----
- GLX_X_VISUAL_TYPE glXGetConfig Z6
- GLX_TRANSPARENT_PIXEL glXGetConfig
- GLX_TRANSPARENT_INDEX glXGetConfig
- GLX_TRANSPARENT_COLOR glXGetConfig
-