HP Workstation zx2000 HP OpenGL Implementation Guide for HP-UX 11.X (IPF versi - Page 30

running hp's implementation of the OpenGL stereo application, GLX_STEREO

Page 30 highlights

running OpenGL programs ■ 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. running hp's implementation of the OpenGL stereo application With HP's implementation of OpenGL and the ATI Fire GL4 graphics devices, it is now possible to run HP's implementation of OpenGL "stereo in a window" mode. The initial release of drivers for the ATI FireGL X1 and Z1 graphics devices do not support stereo visuals. The ATI FireGL X1 and Z1 devices are capable of stereo and support for this functionality will be added in a future release. "Stereo in a window" affects only OpenGL windows that have been created with "stereo capable" GLX visuals. The remainder of the X Server screen is rendered in nonstereo mode without any flickering or color artifacts. The following steps are required to run HP's implementation of OpenGL "stereo in a window" mode: 1. Find out if your monitor is currently configured in a mode that supports stereo. This can be done by running the command: export DISPLAY=myhost:x.y /opt/graphics/OpenGL/contrib/xglinfo/xglinfo The output from xglinfo lists the OpenGL capabilities of the specified X Display, and includes all GLX visuals that are supported. If one or more of the listed GLX visuals are marked as stereo capable, then you can proceed to step three. 2. If none of the GLX visuals support stereo, you will need to reconfigure your monitor to a configuration that supports stereo. Note that you can use the "Monitor Configuration" component of SAM to reconfigure you monitor. After successfully reconfiguring your monitor, the X Server needs to be restarted, and you can verify the availability of GLX stereo visuals by running the xglinfo command again. 3. To select one of the stereo capable GLX visuals through OpenGL, the GLX_STEREO enumerated type should be passed to either glXChooseVisual() or glXGetConfig(). Once a stereo visual has been selected, it can be used to create a stereo window, and glDrawBuffer() can then be called to utilize both the right and left buffers for rendering stereo images. 3-2 OpenGL implementation guide

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42

3–2
OpenGL implementation guide
running OpenGL programs
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.
running hp's implementation of the OpenGL stereo
application
With HP's implementation of OpenGL and the ATI Fire GL4 graphics devices, it is now possible
to run HP's implementation of OpenGL "stereo in a window" mode. The initial release of drivers
for the ATI FireGL X1 and Z1 graphics devices do not support stereo visuals. The ATI FireGL
X1 and Z1 devices are capable of stereo and support for this functionality will be added in a
future release. "Stereo in a window" affects only OpenGL windows that have been created with
"stereo capable" GLX visuals. The remainder of the X Server screen is rendered in nonstereo
mode without any flickering or color artifacts.
The following steps are required to run HP's implementation of OpenGL "stereo in a window"
mode:
1. Find out if your monitor is currently configured in a mode that supports stereo. This can be
done by running the command:
export DISPLAY=myhost:x.y
/opt/graphics/OpenGL/contrib/xglinfo/xglinfo
The output from
xglinfo
lists the OpenGL capabilities of the specified X Display, and
includes all GLX visuals that are supported. If one or more of the listed GLX visuals are
marked as stereo capable, then you can proceed to step three.
2. If none of the GLX visuals support stereo, you will need to reconfigure your monitor to a
configuration that supports stereo. Note that you can use the "Monitor Configuration"
component of SAM to reconfigure you monitor.
After successfully reconfiguring your monitor, the X Server needs to be restarted, and you
can verify the availability of GLX stereo visuals by running the
xglinfo
command again.
3. To select one of the stereo capable GLX visuals through OpenGL, the
GLX_STEREO
enumerated type should be passed to either
glXChooseVisual()
or
glXGetConfig()
. Once a stereo visual has been selected, it can be used to create a stereo
window, and
glDrawBuffer()
can then be called to utilize both the right and left buffers
for rendering stereo images.