Martin Lenahan,您好!
I have solved that problem on my linux system after
I installed the nVidia driver for my GeForce 2 video card. Now I can run any
java3d applet on linux system.
And I tested that code as follows: 1)[code]c = new
Canvas3D(null); [/code] it only gives error
message: ************************************************************************ ***
ERROR: Canvas3D constructed with a null GraphicsConfiguration *** This will
cause a NullPointerException in a subsequent
release ************************************************************************ but
it can run correctly!
2)[code]c = new
Canvas3D(SimpleUniverse.getPreferredConfiguration());[/code] it can run
without any error message
3) [code]GraphicsDevice dev =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
GraphicsConfigTemplate3D template = new
GraphicsConfigTemplate3D(); GraphicsConfiguration config
=
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(template);
c = new Canvas3D(config); [/code] it can run without an error
message
Additionally, the color of the checking box "3D
Accelerate" is gray in the display information on my linux system yet. It
seems that it is not related to "3D accelerate". You only need to install
the driver for your own video .
Thank John, Jian Sun, Martin!
======== 2005-04-11 14:50:00 您在来信中写道:
========
Ive
too experienced this on linux... although not red hat.. found my
problem was that the java3d port I was using wasn't connecting to vid
card resources correctly. In my case a bad opengl config. Check your
OpenGl/Vid configuration. On red hat im not sure how to do it but some
one in around the red hat community will....
I think the
reason it works dif on windows is that the java3d ports work slightly
dif.. Setting a null config, which should just be avoided, in the
windows port (maybe all the sun versions) must use a workaround thats
not implemented in other ports... blackdown maybe.. hence why iits good
practce to avoid doing it...
martin
John Wright wrote:
Windows seems to be very tolerant of errors (probably why it crashes so
much). From the additional information you are providing it would
appear that the code is unable to get an acceptable graphics
configuration on your Linux system. (i.e. you'll probably have to fix
whatever is wrong on your video setup on Linux)
Does it just give an error or does it actually fail to run on Linux?
- John Wright
Starfire Research
cs wrote:
John Wright,您好!
In fact firstly I set Canvas3D as follows:
c = new Canvas3D(null);
and then I changed it to:
c = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
but it error message is not eliminated:(
after read you mail I changed it to:
GraphicsDevice dev = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
GraphicsConfiguration config = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(template);
c = new Canvas3D(config);
Unfortunately the error message exists yet!
you said it is none of linux's business, but why the three above can all run correctly in windows system?
======= 2005-04-09 06:12:00 您在来信中写道:=======
The "Canvas3D constructed with a null GraphicsConfiguration" is a common
"error" that many tolerate as not an issue. It occurs when you create
your Canvas3D using:
new Canvas3D();
If you use:
GraphicsDevice dev =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
GraphicsConfigTemplate3D template = new GraphicsConfigTemplate3D();
GraphicsConfiguration config =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getBestConfiguration(template);
canvas3d = new Canvas3D(config);
you shouldn't have this issue. (this has nothing to do with Linux)
- John Wright
Starfire Research
cs wrote:
Hi,all. My system is linux(redhat 9), j2sdk1.4.2_05,
java3d-1_3_2-linux-i586, and Video card is NVIDIA GeForece 2 GTS
(generic). when I run any simple j3d application or applet(demo in
java3d), it gives me the error message as following:
************************************************************************
*** ERROR: Canvas3D constructed with a null GraphicsConfiguration
*** This will cause a NullPointerException in a subsequent release
************************************************************************
java.lang.NullPointerException: Canvas3D: null GraphicsConfiguration
at javax.media.j3d.Canvas3D.<init>(Unknown Source) at
javax.media.j3d.Canvas3D.<init>(Unknown Source) at
MyBoxTest1.init(MyBoxTest1.java:45) at
com.sun.j3d.utils.applet.MainFrame.run(Unknown Source) at
java.lang.Thread.run(Thread.java:534)
The same java3d application or applet can run in Windows system. And
java applet can run in linux system. I find that the color of the
checking box "3D Accelerate" is gray in the display information of my
linux system, and I cannot check it. I change to another card(ATI
Radeon 9000) and it comes to the same wrong message. So that wrong is
related to this? That means i should install the new driver for the
NVIDIA card? I'm a newbie in linux. anyone met this case?
Thanks,
Martin
===========================================================================
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".
|
= = = = = = = = = = = = = = = = = = = = = =
致 礼!
cs
2005-04-12
===========================================================================
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".
|