Skip to main content

Java3D on Windows 7 64bit

1 reply [Last post]
edm
Offline
Joined: 2010-09-30
Points: 0

Hi,
I have developed an application using java3D. It currently works on Windows XP, Vista and 7 32bit versions and also XP 64bit.
On Windows 7 64bit however the code hangs when I try to set up my GraphicsConfiguration.
My code is set up this way:

GraphicsConfiguration gc = getPreferredConfiguration(graphicsDevice);

The getPreferredConfiguration(...) is a function to get around problems caused by users with multiple monitors :
public static GraphicsConfiguration getPreferredConfiguration(GraphicsDevice device)



  {

<p> </p>
<p>        GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();</p>
<p> </p>
<p>        String stereo;</p>
<p> </p>
<p>        template.setSceneAntialiasing(GraphicsConfigTemplate.REQUIRED);</p>
<p>        template.setDoubleBuffer(GraphicsConfigTemplate.PREFERRED);</p>
<p> </p>
<p>        // Check if the user has set the Java 3D stereo option.</p>
<p>        // Getting the system properties causes appletviewer to fail with a</p>
<p>        // security exception without a try/catch.</p>
<p> </p>
<p>        stereo = (String) java.security.AccessController</p>
<p>            .doPrivileged(new java.security.PrivilegedAction()</p>
<p>            {</p>
<p>                public Object run()</p>
<p>                {</p>
<p>                    return System.getProperty(&quot;j3d.stereo&quot;);</p>
<p>                }</p>
<p>            });</p>
<p> </p>
<p>        // update template based on properties.</p>
<p>        if (stereo != null)</p>
<p>        {</p>
<p>            if (stereo.equals(&quot;REQUIRED&quot;)) template.setStereo(GraphicsConfigTemplate.REQUIRED);</p>
<p>            else if (stereo.equals(&quot;PREFERRED&quot;)) template</p>
<p>                .setStereo(GraphicsConfigTemplate.PREFERRED);</p>
<p>        }</p>
<p>        // Return the GraphicsConfiguration that best fits our needs.</p>
<p>        return device.getBestConfiguration(template);</p>

When compiled and running on Windows 7 64bit the code never returns from the getPreferredConfiguration(...) method. If I use :


c = new Canvas3D(SimpleUniverse.getPreferredConfiguration);

Then the code never returns from Canvas3D.
Another twist in the tale is that when running the source code in NetBeans everything works fine, it's only when compiled that the problem arises. I have tried using both the 32bit Java3D dlls and the 64 bit dlls but have the same problem with both.
Can anyone give any suggestions?
Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
icester
Offline
Joined: 2010-12-05
Points: 0

Do you get stereoscopic mode function running if you use NetBeans?
To get stereo in Windows 7 you either need nVidia QUADRO FX proffecional adapter or nVidia 3D Vision Kit.

Mathew Orman