Index | Introduction | Contents | Install | Dependencies | examples | Data | Viewer | Stereo | osgdem | Plan | Reference Guides |
If the user is planning to use head tracked stereo, or a cave then
it is currently recommend to set it up via a VR toolkit such as
VRjuggler, in this case refer to the VR toolkits handling of stereo,
and keep all the OSG's stereo specific environment variables (below)
set to OFF, or set the values to off within own your own applications.
OSG_STEREO | ON | Turn stereo on |
OFF | Turn stereo off (default). | |
OSG_STEREO_MODE | ANAGLYPHIC | Use anaglyphic stereo when in stereo (default). |
QUAD_BUFFER | Use quad buffered stereo when in stereo. | |
HORIZONTAL_SPLIT | Use horizontal split stereo mode when in stereo | |
VERTICAL_SPLIT | Use vertical split stereo mode when in stereo | |
OSG_SCREEN_DISTANCE | 0.50 | Set the distance the viewer is from screen in metres (default shown) |
OSG_SCREEN_HEIGHT | 0.26 | Set the height if image on the screen in metres (default shown) |
OSG_EYE_SEPARATION | 0.06 | Set the eye separation - interoccular distance (default shown.) |
OSG_SPLIT_STEREO_HORIZONTAL_SEPARATION | 42 | Set the number of pixels between the left and right viewports (default shown). |
OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING | LEFT_EYE_LEFT_VIEWPORT | Set the left eye to render to left viewport, right eye to right viewport (default). |
LEFT_EYE_RIGHT_VIEWPORT | Set the left eye to render to right viewport, right eye to left viewport. | |
OSG_SPLIT_STEREO_VERTICAL_SEPARATION | 42 | Set the number of pixels between the top and bottom viewports (default shown). |
OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING | LEFT_EYE_TOP_VIEWPORT | Set the left eye to render to top viewport, right eye to bottom viewport (default). |
LEFT_EYE_BOTTOM_VIEWPORT | Set the left eye to render to bottom viewport, right eye to top viewport. |
-stereo | Switch on stereo. | |
-stereo | ON | Switch on stereo. |
OFF | Switch off stereo. | |
ANAGLYPHIC | Switch on ANAGLYPHIC stereo. | |
QUAD_BUFFER | Switch on QUAD_BUFFER stereo. | |
VERTICAL_SPLIT | Switch on VERTICAL_SPLIT stereo. | |
HORIZONTAL_SPLIT | Switch on VERTICAL_SPLIT stereo. |
To invoke quad buffered stereo from the commandline:
osgviewer -stereo QUAD_BUFFER cow.osg
To force all apps to start up in quad buffered stereo (if system
supports it)
export OSG_STEREO=ON
export OSG_STEREO_MODE=QUAD_BUFFER
osgviewer cow.osg
To set quad buffered stereo to the default, but use the commandline
to switch stereo on:
export OSG_STEREO=OFF
export OSG_STEREO_MODE=QUAD_BUFFER
osgviewer -stereo cow.osg