If you use GraphicsConfigTemplate3D.REQUIRED you get null back, when you
use GraphicsConfigTemplate3D.PREFERRED you will not return null. The above
is for the case where stereo will not work with Java3D which I suspect is
the case
for both of your cards. Java3D makes standard OpenGL calls for stereo which did
not work with my Wildcat card, but did work with my E&S card.
At 05:12 PM 12/15/2000 +1100, you wrote:
>Hi. I wonder if someone can help me and explain what I might be
>doing wrong. I suspect I might be missing something obvious.
>
>I want to perform stereoscopy and have started off small by
>modifying the HelloUniverse demonstration to that end. However
>I'm unable to achieve that: it appears that I'm unable to
>obtain a GraphicsConfiguration that supports stereo. This is
>despite running the program in an environment where I can
>achieve stereo directly in openGL.
>
>Here's the particulars:
>
>Platforms: Windows98+Voodoo3 (with latest drivers)
> NT+twin Wildcat4000 cards
>Java 3D version: 1.2.1 Beta (OpenGL).
>JDK: 1.3
>Command Line: java -Dj3d.stereo=REQUIRED -Dj3d.sharedstereozbuffer=true
> OR java -Dj3d.stereo=REQUIRED
> OR java -Dj3d.sharedstereozbuffer=true
>Code Changes:
> I altered the init() method to explicitly create a GraphicsConfiguration
> object that would support stereo. This was done by first creating a
> GraphicsConfigTemplate3D, setting the appropriate attribute, and
> then using the GraphicsEnvironment -> ScreenDevice ->
> GraphicsConfiguration route. The altered piece of code follows.
>
>
> public void init() {
> setLayout(new BorderLayout());
>
> GraphicsConfigTemplate3D gct3d = new GraphicsConfigTemplate3D();
> gct3d.setStereo(GraphicsConfigTemplate3D.REQUIRED);
> GraphicsConfiguration config =
>
>GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().
>getBestConfiguration(gct3d);
>
> Canvas3D c = new Canvas3D(config);
>
> System.out.println("Stereo availability is: " +
> c.getStereoAvailable());
> c.setStereoEnable(true);
> System.out.println("Stereo enabled is: " + c.getStereoEnable());
> add("Center", c);
>
>
>No matter what platform, resolution, or colour depth I run this in
>I always receive a null GraphicsConfiguration (config) back from
>the getBestConfiguration() call. Hence the Canvas3D is constructed
>with a null argument and hence is a default Canvas3D without stereo.
>Thats shown by the first trace statement which always prints that stereo
>is not available.
>
>I'm sure I must be missing something obvious (and hence will be
>suitably contrite once its been pointed out), but for the life of me
>I can't currently see what it is. Help would be greatly appreciated.
>
>
>Cheers,
>Spike
>Dr. Michael Barlow
>School of Computer Science
>ADFA
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
Jack S. Gundrum
Visualization Group
Center for Academic Computing
Penn State University
Email:[EMAIL PROTECTED]
Phone:(814)865-1863
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".