HP Workstation zx2000 HP OpenGL Implementation Guide for HP-UX 11.X (IPF versi - Page 22
GLX_EXT_visual_info program fragments, GLX visual rating extension
View all HP Workstation zx2000 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 22 highlights
overview of OpenGL GLX_EXT_visual_info program fragments Note that both of the following segments assume that the GLX_EXT_visual_info extension exists for dpy, which is a pre-existing display connection to an X Server. Here is a sample code segment that forces selection of a TrueColor visual. Display *dpy; XVisualInfo *vInfo; int attrList[] = {GL_USE_GL, GLX_X_VISUAL_TYPE_EXT, GLX_TRUE_COLOR_EXT, None}; vinfo = glXChooseVisual(dpy, XDefaultScreen(dpy), &attrList); The following sample is a code segment that selects an overlay visual with index transparency, and then obtains the Pixel index for the transparent color. Display *dpy; XVisualInfo *visInfo; int transparentPixel; int attrList[] = {GL_USE_GL, GLX_LEVEL, 1, GLX_TRANSPARENT_TYPE_EXT, GLX_TRANSPARENT_INDEX_EXT, None}; visInfo = glXChooseVisual(dpy, XDefaultScreen(dpy), &attrList); if (visInfo!= NULL) { glXGetConfig(dpy, visInfo, GLX_TRANSPARENT_INDEX_VALUE_EXT, &transparentPixel); } GLX visual rating extension The GLX_EXT_visual_rating extension provides additional GLX visual information which applies rating properties to GLX visuals. The enumerated types listed below can be passed to either glXChooseVisual, or glXGetConfig to specify or inquire visual rating information. Enumerated Types for GLX Visual Rating Extended Area Enumerated Types Description Visual rating GLX_NONE_EXT GLX_SLOW_VISUAL_EXT GLX_NON_CONFORMANT_VISUAL_EXT Default: N/A Values associated with the GLX_VISUAL_CAVEAT_EXT enumerated type Note that all current HP GLX visuals are rated as GLX_NONE_EXT. This extension is implemented for possible future visual support and for use with non-HP servers. Coding to use the GLX_EXT_visual_rating extension is similar to the segments listed above for the GLX_EXT_visual_info extension. 1-18 OpenGL implementation guide