running OpenGL programs
virtual GLX (VGL) mode
•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.
•Because of the way VMD works (rendering to a VM buffer and then displaying the images through X11 protocol), it will behave a bit differently than hardware devices. In particular, since VMD renders to VM buffers, changes to the X11 window will not appear until a buffer swap or a glFlush/glFinish.
•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, int screen)
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.
Chapter 3 | 39 |