Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP's Implementation of OpenGL: HP 9000 Workstations > Chapter 4 Running OpenGL Programs

Virtual GLX (VGL) Mode

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

Virtual GLX (VGL) defines a special transparent mode within HP's implementation of OpenGL that allows an HP client to render through OpenGL to X servers and/or X terminals that do not support OpenGL or the X server extension for GLX.

This mode is implemented by emulating the X server extension within the OpenGL API client-side library and using the HP Virtual Memory Driver (VMD) to perform Xlib rendering.

VGL provides flexibility for OpenGL users, but does not provide the same level of performance as is available to servers supporting GLX.

Visual Support for the VGL Mode

In VGL mode, the visual capabilities incorporated in glXChooseVisual() and glXGetConfig() are synthesized from the list of X Visuals supported on the target X Server and the capabilities of the Virtual Memory Driver (VMD). Table 1-5 in Chapter 1 lists the X Visuals that are supported through the OpenGL Extension to the X Window System (GLX) in the Virtual GLX (VGL) mode.

Special Considerations

When you are in the VGL mode, you will notice the following differences between it and the GLX mode.

  • VGL deals with X servers that do not support replicated X visuals that provide extended GLX capabilities. This results in a GLX visual list that is synthesized from available X visuals. This list is assigned the maximum set of capabilities supported by the Virtual Memory Driver (VMD) for each particular visual. For example, if a visual is found to be supported by the Double-Buffered Extension (DBE), then it will be reported as having the capability of doing double-buffering. Note that there will not be a counterpart for the GLX visual with the same type and depth that is single buffered. If a request is made for a single buffered visual, a double-buffered visual will match the request, but that visual will only be available for single-buffered rendering unless a new display connection is opened to the VGL display.

  • OpenGL and Xlib rendering when mixed and sent to the same drawable in VGL mode may behave differently than if a GLX capable X server were used. This is because in VGL mode OpenGL rendering is not strictly bounded by the limits of primitives rendered as is the case when a GLX server is used. In fact, rendering a single GLX primitive can result in repainting the entire drawable. This means that in the VGL mode it may not be safe to rely upon the fact that Xlib and OpenGL render to different regions of the drawable. The best way to avoid this issue is to always perform Xlib rendering after OpenGL rendering.

  • The glReadPixels routine when used in the VGL mode will return only pixel data rendered via OpenGL. Xlib rendering will not be included.

  • A call to glXSwapBuffers is the only approved way to achieve double buffering for VGL visuals. Note that calls made to XdbeSwapBuffers will not work correctly.

  • A call can be made to:

    Bool hpglXDisplayIsVGL(Display *dpy)

    to determine if a particular display connection is operating in VGL mode. The return value is "True" if dpy is VGL; otherwise, the value returned is "False." This is an HP function that is not available on other implementations of OpenGL.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.