You should be using GraphicsEnvironment object to .getDefaultScreenDevice()
where you right, but then you should use this device to
.setFullScreenWindow(frame) where you are right also. I tried exactly the
same thing as you did, so here is my code to show you how did I get the
GraphicsConfiguration object:
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice d = ge.getDefaultScreenDevice();
if(d.isFullScreenSupported())
d.setFullScreenWindow(frame); // frame is my window
frame
GraphicsConfiguration[] gc = d.getConfigurations();
GraphicsConfigTemplate3D gct = new
GraphicsConfigTemplate3D();
GraphicsConfiguration graphics =
gct.getBestConfiguration(gc);
if(gct.isGraphicsConfigSupported(graphics))
System.out.println("Graphics Device Supported");
else{
System.out.println("Graphics Device NOT Supported");
System.exit(1);
}
Canvas3D c3d = new Canvas3D(graphics);
The JavaDoc says that you have to get the GraphicsConfiguration object from
the Template3D. There may be other ways to get it but I just know this way.
Hope it helps.
Andy
----- Original Message -----
From: "Sch�fer, Peter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 19, 2002 4:08 AM
Subject: [JAVA3D] Fullscreen Mode - Help needed
> Hi there !
>
> I have some problems running Java3D in fullscreen mode with JDK 1.4.
> Here is what I'm trying to do:
>
> GraphicsConfiguration gc =
> SimpleUniverse.getPreferredConfiguration();
> GraphicsEnvironment ge =
> GraphicsEnvironment.getLocalGraphicsEnvironment();
> GraphicsDevice gd = ge.getDefaultScreenDevice();
>
> JFrame window = new JFrame(null,gc);
> window.setUndecorated(true);
> gd.setFullScreenWindow(window);
>
> Canvas3D canvas = new Canvas3D(gc);
> // ...
> SimpleUniverse universe = new SimpleUniverse(canvas);
> // ...
> window.getContentPane().add(canvas);
>
> but as soon as the Java3D renderer starts, the JVM crashes:
>
> An unexpected exception has been detected in native code outside
the
> VM.
> Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at
> PC=3D0x10003690
> Function=3D[Unknown.]
> Library=3D(N/A)
> ...
> Current Java thread:
> at javax.media.j3d.Canvas3D.createQueryContext(Native
> Method)
> at
> javax.media.j3d.Canvas3D.createQueryContext(Canvas3D.java:3353)
> at javax.media.j3d.Renderer.doWork(Renderer.java:392)
> at javax.media.j3d.J3dThread.run(J3dThread.java:250)
>
> Dynamic libraries:
> 0x7D240000 - 0x7D26D000 =09C:\WINDOWS\SYSTEM\DBGHELP.DLL
>
> Local Time =3D Wed Sep 18 21:16:40 2002
> Elapsed Time =3D 9
> #
> # The exception above was detected in native code outside the VM
> #
> # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
> #
>
> can anybody give me a hint about that ?
>
> it could as well a problem in the graphics card driver, or DirectX, or
> whatever...
> Here is my system configuration:
>
> Windows ME
> DirectX 8.1
> nVidia GeForce2 GTS, driver version 12.41
> JDK 1.4.1
> Java3D 1.3 (DirectX version)
>
> Any help is appreciated,
> -- Peter
>
>
===========================================================================
> 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".
===========================================================================
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".