Intro05

From JReality Wiki
Jump to: navigation, search

Set the camera

Source file: Intro05

JavaDoc: Camera


Run as Java webstart


In this example we show how to locate the current camera, and then how to activate stereo mode in the camera. Add the following code to the above:


    dgs.setShowFaces(false);
    CameraUtility.getCamera(va.getViewerSwitch()).setStereo(true);

Note: the only backend that currently (December, 2008) support stereo viewing is the JOGL backend.


The result should like something like this (except the colors might be different!):


After loading a dodecahedron


Previous: Intro04 Developer Tutorial: Contents Next: Intro06