NAME glXChooseFBConfigSGIX - return a visual that matches speci- fied attributes C SPECIFICATION GLXFBConfigSGIX* glXChooseFBConfigSGIX( Display *dpy, int screen, int *attribList, int *nelements ) PARAMETERS dpy Specifies the connection to the X server. screen Specifies the screen number. attribList Specifies a list of boolean attributes and integer attribute/value pairs. The last attri- bute must be None. nelements Specifies the number of configs returned. DESCRIPTION A GLXFBConfigSGIX describes the format, type and size of the color buffers and ancillary buffers for a GLXDrawable. When the GLXDrawable is a window then the GLXFBConfigSGIX that describes it has an associated X Visual; for GLXPixmaps and GLXPbuffers there may or may not be an X Visual associated with the GLXFBConfigSGIX. Use glXChooseFBConfigSGIX to get GLXFBConfigSGIXs that match a list of attributes or to get the list of GLXFBConfigSGIXs that are available on the specified screen. If attribList is NULL then glXChooseFBConfigSGIX returns an array of GLXFBConfigSGIXs that are available on the speci- fied screen; otherwise this call returns an array of GLXFBConfigSGIXs that match the specified attributes. See glXGetFBConfigAttribSGIX for a list of attributes. The number of elements in the array is returned in nelements. The attributes are matched in an attribute-specific manner, as shown in Table 1 below. Some of the attributes, such as GLX_LEVEL, must match the specified value exactly; others, such as, GLX_RED_SIZE must meet or exceed the specified minimum values. To retrieve the GLXFBConfigSGIX, given an i.d., use the GLX_FBCONFIG_ID_SGIX attribute. When GLX_FBCONFIG_ID_SGIX is specified, all other attributes are ignored, and only the GLXFBConfigSGIX with the given XID is returned (NULL is returned if it does not exist). If no conforming GLXFBConfigSGIX exists, or if an error occurs then NULL is returned. If attribList is not NULL and more than one GLXFBConfigSGIX is found, then a list of GLXFBConfigSGIXs, sorted according to the "best" match cri- teria, is returned. The exact sorting precedence order is described later. Use XFree to free the memory returned by glXChooseFBConfigSGIX. If GLX_RENDER_TYPE_SGIX is in attribList then the value that follows is a mask indicating which type of GLXContexts draw- ables created with the corresponding GLXFBConfigSGIXs be bound to. For example, if GLX_RGBA_BIT_SGIX | GLX_COLOR_INDEX_BIT_SGIX is specified as the mask then glXChooseFBConfigSGIX will search for GLXFBConfigSGIXs that can be used to create drawables that can be bound to both RGBA and color index rendering contexts. The default value for GLX_RENDER_TYPE_SGIX is GLX_RGBA_BIT_SGIX. The attribute GLX_DRAWABLE_TYPE_SGIX has as its value a mask indicating the drawable types that can be created with the corresponding GLXFBConfigSGIX (the config is said to ``sup- port'' these drawable types). For example, a GLXFBConfigS- GIX for which the value of GLX_DRAWABLE_TYPE_SGIX attribute is GLX_WINDOW_BIT_SGIX | GLX_PIXMAP_BIT_SGIX can be used to create both Windows and GLX pixmaps, while a config for which this attribute value is GLX_WINDOW_BIT_SGIX can not be used for creating GLX pixmaps. The default value for GLX_DRAWABLE_TYPE_SGIX is GLX_WINDOW_BIT_SGIX. If a GLXFBConfigSGIX supports Windows then it has an associ- ated X Visual. The value of the GLX_X_VISUAL_TYPE_EXT attri- bute specifies the type of X Visual. The possible values are: ______________________________________ | 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 | |_____________________________________| Note that RGBA rendering may be supported for any of the six Visual types but color index rendering is only supported for PseudoColor, StaticColor, GrayScale, and StaticGray visuals (i.e., single-channel visuals). The GLX_X_VISUAL_TYPE_EXT attribute is ignored if GLX_DRAWABLE_TYPE_SGIX is specified in attribList and the mask that follows does not have GLX_WINDOW_BIT_SGIX set. GLX_X_RENDERABLE_SGIX is a boolean indicating whether X can be used to render into a drawable created with the GLXFBCon- figSGIX. This attribute is True if the GLXFBConfigSGIX sup- ports Windows and/or GLX pixmaps. All attributes in attribList, including boolean attributes, are immediately followed by the corresponding desired value. The list is terminated with None. If an attribute is not specified in attribList then the default value (listed in Table 1) is used (it is said to be specified implicitly). For example, if GLX_STEREO is not specified then it is assumed to be False. For some attributes, the default is "don't care" meaning that any value is OK for this attri- bute, so the attribute will not be checked. _________________________________________________________________ | Attribute default sorting criteria| |________________________________________________________________|_ | GLX_BUFFER_SIZE 0 smaller | | GLX_LEVEL 0 exact | | GLX_DOUBLEBUFFER don't care smaller | | GLX_STEREO False exact | | GLX_AUX_BUFFERS 0 smaller | | GLX_RED_SIZE 0 larger | | GLX_GREEN_SIZE 0 larger | | GLX_BLUE_SIZE 0 larger | | GLX_ALPHA_SIZE 0 larger | | GLX_DEPTH_SIZE 0 larger | | GLX_STENCIL_SIZE 0 larger | | GLX_ACCUM_RED_SIZE 0 larger | | GLX_ACCUM_GREEN_SIZE 0 larger | | GLX_ACCUM_BLUE_SIZE 0 larger | | GLX_ACCUM_ALPHA_SIZE 0 larger | | GLX_SAMPLE_BUFFERS_SGIS 0 smaller | | GLX_SAMPLES_SGIS 0 smaller | | GLX_X_VISUAL_TYPE_EXT don't care exact | | GLX_TRANSPARENT_TYPE_EXT don't care exact | | GLX_NONE_EXT don't care exact | | GLX_TRANSPARENT_INDEX_VALUE_EXT don't care exact | | GLX_TRANSPARENT_RED_VALUE_EXT don't care exact | | GLX_TRANSPARENT_GREEN_VALUE_EXT don't care exact | | GLX_TRANSPARENT_BLUE_VALUE_EXT don't care exact | | GLX_TRANSPARENT_ALPHA_VALUE_EXT don't care exact | | GLX_VISUAL_CAVEAT_EXT don't care exact | | GLX_DRAWABLE_TYPE_SGIX don't care exact | | GLX_WINDOW_BIT_SGIX don't care mask | | GLX_RENDER_TYPE_SGIX don't care mask | | GLX_RGBA_BIT_SGIX don't care mask | | GLX_X_RENDERABLE_SGIX don't care exact | | GLX_FBCONFIG_ID_SGIX don't care exact | | GLX_MAX_PBUFFER_WIDTH_SGIX 0 minimum | | GLX_MAX_PBUFFER_HEIGHT_SGIX 0 minimum | | GLX_MAX_PBUFFER_PIXELS_SGIX 0 minimum | | GLX_OPTIMAL_PBUFFER_WIDTH_SGIX ignored ignored | | GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX ignored ignored | |________________________________________________________________| When more than one GLXFBConfigSGIX matches the specifica- tion, a list of matching configurations is returned. The list is sorted according to the following precedence rules that are applied in ascending order (i.e., configurations that are considered equal by lower numbered rule are sorted by the higher numbered rule): 1. by GLX_VISUAL_RATING_EXT where the precedence is GLX_NONE_EXT, GLX_SLOW_VISUAL. 2. larger total number of RGBA color components (GLX_RED_BITS,GLX_GREEN_BITS, GLX_BLUE_BITS, and GLX_ALPHA_BITS) that have higher number of bits, 3. smaller GLX_INDEX_BITS, 4. single buffered configuration (GLX_DOUBLE_BUFFER being False) precedes a double buffered one, 5. smaller GLX_AUX_BUFFERS, 6. smaller GLX_SAMPLE_BUFFERS_SGIS, 7. smaller GLX_SAMPLES_SGIS, 8. larger GLX_DEPTH_BITS, 9. smaller GLX_STENCIL_BITS, 10. larger total number of accumulation buffer color com- ponents (GLX_ACCUM_RED_BITS, GLX_ACCUM_GREEN_BITS, GLX_ACCUM_BLUE_BITS, and GLX_ACCUM_ALPHA_BITS) that have higher number of bits; 11. sort by GLX_VISUAL_TYPE_EXT where the precedence order is GLX_TRUE_COLOR_EXT, GLX_DIRECT_COLOR_EXT, GLX_PSEUDO_COLOR_EXT, GLX_STATIC_COLOR_EXT, GLX_GRAY_SCALE_EXT, GLX_STATIC_GRAY_EXT The definition of the sorting criteria is as follow: smaller configs with attribute value that meets or exceeds the specified value are returned, with precedence given to smaller values (when a value is not expli- citly requested, the default is implied); larger when the value is requested explicitly, only con- figs with a corresponding attribute value that meet or exceed the specified value are returned, with precedence given to larger values. When the value is not requested explicitly behaves exactly like the ``smaller'' criterion. exact only configs whose corresponding attribute value exactly matches the requested value are considered. mask - only configs for which the set bits of corresponding attribute include all the bits that are set in the requested value are considered (Additional bits might be set in the attribute). NOTES GLX_SGIX_fbconfig extension should be supported for this function to be valid. ERRORS NULL is returned if an undefined GLX attribute is encoun- tered in attribList. or dpy does not support GLX extension or screen is invalid. SEE ALSO glXCreateContextWithConfigSGIX, glXCreateGLXPixmapWithCon- figSGIX, glXGetVisualFromFBConfigSGIX, glXGetFBConfigFrom- VisualSGIX, glXGetFBConfigAttribSGIX
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |