Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java3D in fullscreen mode?  (Read 1984 times)
0 Members and 1 Guest are viewing this topic.
Offline wiesi

Senior Newbie




Java rulez!


« Posted 2003-04-15 03:51:54 »

Hi!

I've a problem with Java3D. When I want to start it in the fullscreen mode I get an exception:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
An unexpected exception has been detected in native code outside the VM. 
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x10003690
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
   at javax.media.j3d.Canvas3D.createContext(Native Method)
   at javax.media.j3d.Renderer.doWork(Renderer.java:680)
   - locked <031DB3C8> (a java.lang.Object)
   at javax.media.j3d.J3dThread.run(J3dThread.java:250)

Dynamic libraries:
0x6D240000 - 0x6D245000    D:\J2SDK1.4.1_02\JRE\BIN\JAWT.DLL

Local Time = Mon Apr 14 16:18:46 2003
Elapsed Time = 6
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_02-b06 mixed mode)
#


But in the window-mode it works.

Here's the code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
import java.awt.*; 
import java.awt.event.*;

import com.sun.j3d.utils.universe.SimpleUniverse;
import com.sun.j3d.utils.geometry.ColorCube;
import javax.media.j3d.*;

public class Full3D extends Frame {
   
   Canvas3D canvas3D;
   GraphicsConfiguration config;
   GraphicsDevice device;
   
   public Full3D() {
      config = getGraphicsConfiguration();
      device = config.getDevice();
      canvas3D = new Canvas3D(config);
      setUndecorated(true);
      add(canvas3D);
      setSize(320, 240);
      addKeyListener(new KeyAdapter() {
         public void keyPressed(KeyEvent e) {
            System.exit(0);
         }
      });
      DisplayMode mode = new DisplayMode(320, 240, 16, 0);
      try {
         device.setFullScreenWindow(this);
         device.setDisplayMode(mode);
      }
      catch(Exception e) {
         e.printStackTrace();
         System.exit(1);
      }
      setVisible(true);
      SimpleUniverse universe = new SimpleUniverse(canvas3D);
      BranchGroup scene = new BranchGroup();
      ColorCube cube = new ColorCube(0.4);
      Transform3D transform = new Transform3D();
      transform.rotX(4);
      TransformGroup group = new TransformGroup(transform);
      group.addChild(cube);
      scene.addChild(group);
      universe.getViewingPlatform().setNominalViewingTransform();
      universe.addBranchGraph(scene);
   }
   
   public static void main(String[] a) {
      new Full3D();
   }
}


Please help me and excuse me for my bad english.


Wiesi
Offline misterX

Junior Devvie




java forever!


« Reply #1 - Posted 2003-04-15 18:35:09 »

It worked fine here (openGL java3d implementation).

I just had this "warning message":
1  
2  
3  
4  
************************************************************************
*** ERROR: GraphicsConfiguration not created with GraphicsConfigTemplate3D
*** This will cause an IllegalArgumentException in a subsequent release
************************************************************************
Offline Conzar

Junior Devvie




There is nothing common about common sense


« Reply #2 - Posted 2003-04-16 13:37:59 »

What OS are you running on?

I know under linux using Sun's JVM - Full Screen mode isn't supported.

Ubuntu
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline wiesi

Senior Newbie




Java rulez!


« Reply #3 - Posted 2003-04-17 15:33:59 »

Quote
What OS are you running on?

I know under linux using Sun's JVM - Full Screen mode isn't supported.


I'm running it on Win98 and I use the DirectX-Java3D-implementation.

Wiesi
Offline Ifadolai

Junior Devvie




Java forever!!


« Reply #4 - Posted 2003-04-17 20:15:30 »

It looks like you need the J3D team assistance.

You better post this bug on the official Java3D mailing list:

How to Subscribe
http://java.sun.com/products/java-media/3D/forDevelopers/interest_group.html
View the E-Mail Archive
http://archives.java.sun.com/archives/java3d-interest.html

Nikolai V. Christensen, Computer Engineer,
Simulation and Training department
IFAD, Forskerparken 10A, DK-5230 Odense M
Denmark, EU
Phone: +45 63 15 71 31  Fax: +45 65 93 29 99
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #5 - Posted 2003-04-18 11:22:34 »

For directX, you need the

1  
-Dsun.java2d.noddraw=true


commandline option. It's documented somewhere.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Breakfast

Senior Devvie




for great justice!


« Reply #6 - Posted 2003-04-18 17:43:12 »

Is it possible to find what version/3d interface of Java3D we are working with from inside a program?

In fact, it would have to be an installer wouldn't it, capable of writing bat files to enable it to start under the right api options?
Offline Conzar

Junior Devvie




There is nothing common about common sense


« Reply #7 - Posted 2003-04-18 19:14:52 »

You can check to see if the Full Screen exclusive mode is supported by doing this
1  
2  
3  
4  
GraphicsDevice gDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
   if(gDevice.isFullScreenSupported()){
         System.out.println("Full Screen Supported");
   }

Ubuntu
Offline wiesi

Senior Newbie




Java rulez!


« Reply #8 - Posted 2003-04-19 05:41:19 »

Quote
For directX, you need the

1  
-Dsun.java2d.noddraw=true


commandline option. It's documented somewhere.


And how do I use this option?
Du sprichst Deutsch, oder?

Wiesi
Offline Herkules

Senior Devvie




Friendly fire isn't friendly!


« Reply #9 - Posted 2003-04-19 06:41:06 »

Quote


And how do I use this option?


1  
java -Dsun.java2d.noddraw=true yourapp



Quote

Du sprichst Deutsch, oder?


Ja sicher Smiley

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bienator

Senior Devvie




OutOfCoffeeException


« Reply #10 - Posted 2003-04-20 13:16:17 »

Hi

I get the same exeption:


An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x199E2F08
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
     at javax.media.j3d.NativeConfigTemplate3D.choosePixelFormat(Native Method)
     at javax.media.j3d.NativeConfigTemplate3D.getBestConfiguration(NativeConfigTemplate3D.java:79)
     at javax.media.j3d.Renderer.doWork(Renderer.java:410)
     at javax.media.j3d.J3dThread.run(J3dThread.java:250)

Dynamic libraries:
0x00400000 - 0x00406000       C:\Programme\Java\j2re1.4.1_01\bin\javaw.exe
0x77F80000 - 0x77FFF000       C:\WINNT\System32\ntdll.dll
0x77DA0000 - 0x77DFA000       C:\WINNT\system32\ADVAPI32.dll
0x77E70000 - 0x77F33000       C:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77D9F000       C:\WINNT\system32\RPCRT4.DLL
0x77E00000 - 0x77E65000       C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000       C:\WINNT\system32\GDI32.DLL
0x78000000 - 0x78046000       C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D45A000       C:\Programme\Java\j2re1.4.1_01\bin\client\jvm.dll
0x77540000 - 0x77571000       C:\WINNT\System32\WINMM.dll
0x6D1D0000 - 0x6D1D7000       C:\Programme\Java\j2re1.4.1_01\bin\hpi.dll
0x6D300000 - 0x6D30D000       C:\Programme\Java\j2re1.4.1_01\bin\verify.dll
0x6D210000 - 0x6D229000       C:\Programme\Java\j2re1.4.1_01\bin\java.dll
0x6D320000 - 0x6D32D000       C:\Programme\Java\j2re1.4.1_01\bin\zip.dll
0x6D000000 - 0x6D0FB000       C:\Programme\Java\j2re1.4.1_01\bin\awt.dll
0x777F0000 - 0x7780D000       C:\WINNT\System32\WINSPOOL.DRV
0x75DF0000 - 0x75E0A000       C:\WINNT\System32\IMM32.dll
0x77A40000 - 0x77B35000       C:\WINNT\system32\ole32.dll
0x19FE0000 - 0x1A002000       C:\Programme\Java\j2re1.4.1_01\bin\J3D.dll
0x693A0000 - 0x69467000       C:\WINNT\System32\OPENGL32.dll
0x6F9F0000 - 0x6FA10000       C:\WINNT\System32\GLU32.dll
0x72770000 - 0x727B6000       C:\WINNT\System32\DDRAW.dll
0x72810000 - 0x72816000       C:\WINNT\System32\DCIMAN32.dll
0x6D230000 - 0x6D235000       C:\Programme\Java\j2re1.4.1_01\bin\jawt.dll
0x6D180000 - 0x6D1D0000       C:\Programme\Java\j2re1.4.1_01\bin\fontmanager.dll
0x72D00000 - 0x72D73000       C:\WINNT\System32\D3DIM.DLL
0x1A330000 - 0x1A8FE000       C:\WINNT\System32\fgl1ogl.dll
0x77910000 - 0x77932000       C:\WINNT\system32\imagehlp.dll
0x72970000 - 0x7299D000       C:\WINNT\system32\DBGHELP.dll

0x68F30000 - 0x68F3B000       C:\WINNT\System32\PSAPI.DLL

Local Time = Sun Apr 20 17:01:36 2003
Elapsed Time = 16
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode)
#
# An error report file has been saved as hs_err_pid932.log.
# Please refer to the file for further information.
#

but just if i use GraphicsConfiguration.getBestConfiguration(...);
if I make it like in the code from wiesi I get the well known
warning:

************************************************************************  
*** ERROR: GraphicsConfiguration not created with GraphicsConfigTemplate3D
*** This will cause an IllegalArgumentException in a subsequent release
************************************************************************
PS: ich spreche auch Deutsch Wink

bienator

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!