With the upgrade to JoGL 2.0, and some enhancements to our infrastructure, we are able to provide the support for stereoscopic 3D rendering within JyMOL. It is as easy as instantiating the JyMol object using the ENABLE_STEREO parameter and changing the stereo setting to on.
JyMol jymol = new JyMol(JyMol.ENABLE_STEREO); jymol.cmd.set("stereo", "1");
By default, the stereo_mode is set in the same way PyMOL does it by default: if stereo is available, it sets the stereo_mode to quadbuffer(1), otherwise it sets it to crosseye(2).
Note: If you want to use JyMol in Stereoscopic mode if possible, otherwise, regular mode (e.g., not crosseyed), you need to set the stereo_mode. Setting the stereo_mode to “1” will do this:
jymol.cmd.set("stereo_mode", "1");
Note: If you are not able to get JyMol to render stereo, but other 3D programs are rendering stereo just fine, it could be because JoGL might not be able to detect your stereo device, such as a Planar StereoMirror device (see Known Issue Planar StereoMirror devices are not rendering stereo). To workaround this, you can add the OVERRIDE_SUPPORTS_STEREO argument to the JyMOL constructor like this:
jymol = new JyMol(JyMol.ENABLE_STEREO | JyMol.OVERRIDE_SUPPORTS_STEREO);
We are interested in improving JoGL and our stereo detection, so if you have problems, you can Contact Us.
It is also possible to have a JyMOL Stereoscopic Applet running inside a browser if the client-side hardware allows it. This is fairly new, and not completely tested on all platforms and hardware combinations, but should be possible in all cases that JoGL supports.
The same code/commands described above need to be used. The demonstration Applet (JyMOLApplet), that comes with JyMOL 1.1, has an argument STEREO that allows users to control whether the JyMol.ENABLE_STEREO argument should be passed into the JyMol constructor. This can be done by setting the applet argument in the html inside the <applet> tag like this:
<param name="STEREO" value="true" />
The stereo and stereo_mode settings can also be set by running commands. (see the Documentation for JyMOLApplet)
You can also see the Online Demonstration that shows how you can change dynamically between stereo modes such as real stereo and anaglyph stereo.
set in the PyMOL api. For Applets, see the stereo.html file referenced in Java Applet Deployment.