[JAVA3D] Transparency problems in Java3D 1.2

2000-10-12 Thread Damir Arh
Hello! Yesterday I decided to update my Java3D installation. I installed Java3D 1.2 and Java Plug-In 1.3 to be able to try out some of the new J3D applets I found on the net. I was really satisfied with what I saw until... I tried out a small program I was writing. It's just a small transparent

[JAVA3D] Loading images with Java Plug-In in Internet Explorer

2000-10-12 Thread Damir Arh
Hello! I've written a small applet which uses textures with Java3D. This applet is displayed fine in Netscape and in the AppletViewr but it fails in Internet Explorer with the following error: Error: in loading image java.lang.NullPointerException at com.sun.j3d.utils.image.TextureLoader.getTex

[JAVA3D] Including images in a jar file

2000-10-12 Thread Damir Arh
Hello! This isn't really completely Java3D related but I came accross this problem while writing in Java3D so I decided to ask here. Is it possible to include the images necessary for the applet to run in a jar file? I tried to put them into the archive but JVM complained for not finding the imag

Re: [JAVA3D] Including images in a jar file

2000-10-12 Thread Ingo Brunberg
Hi Damir, to load images from the jar file you have to use the getResource() method. I use something like this: ImageIcon icon = new ImageIcon(getClass().getResource("image.gif")); Hope it helps, Ingo === To unsubscribe,

[JAVA3D] Loaders and their opposite

2000-10-12 Thread Thomas Björge
Hello! Apart from the brief discussion in the tutorial section 3.2, where does one find information and perhaps even some kind of tutorial regarding how to write loaders? And what about exporting a Scene in some kind of format? For instance after some slight editing. How does one go about accom

Re: [JAVA3D] Loading images with Java Plug-In in Internet Explore r

2000-10-12 Thread J. Lee Dixon
Can't tell what is going on just by seeing the stack dump; how about showing a code snippet around line 71 of your Boing applet -Original Message- From: Damir Arh [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 5:12 AM To: [EMAIL PROTECTED] Subject: [JAVA3D] Loading images

Re: [JAVA3D] Loading images with Java Plug-In in Internet Explorer

2000-10-12 Thread Damir Arh
Hello! Yes, sure. I just wasn't attaching it as it works fine everywhere else except in IE so I thought it's not a matter of code. Anyway, it's nothing special, just using the TextureLoader to get the file. 71: TextureLoader texLoader = new TextureLoader("checkered.gif",this); 72: app.setTextu

Re: [JAVA3D] Loading images with Java Plug-In in Internet Explore r

2000-10-12 Thread J. Lee Dixon
Well, we know the texture loader works in IE... there is nothing obvious from your code snippet... although, the stack trace says it is in "TextureLoader.getTexture()", which you call on line 72. Sounds more like it's dying at line 72 because it is not finding the texture actually, you are at

Re: [JAVA3D] Transparency problems in Java3D 1.2

2000-10-12 Thread Bob Gray
In my experience, Transparency does not work correctly in Java 3D and hasn't for well over a year. Very frustrating to me since *most* of the things I want to do involve surrounding one polyhedron with another with the outer one partly transparent. I've had to use "SCREENDOOR" type transparency

Re: [JAVA3D] Including images in a jar file

2000-10-12 Thread Damir Arh
Hello! > to load images from the jar file you have to use the getResource() > method. I use something like this: > ImageIcon icon = new ImageIcon(getClass().getResource("image.gif")); Thanks. It works now. At the same time it solved my problem with IE not wanting to load the images at all. Unfo

Re: [JAVA3D] Transparency problems in Java3D 1.2

2000-10-12 Thread Damir Arh
Hello! Huh! I'm certainly not glad to hear that. I guess I can then just put this project of mine on hold until the next release of Java3D. SCREENDOOR transparency is really not a satisfactory option for me. I already tried it yesterday when looking for the problem in my code. It did 'work' but t

Re: [JAVA3D] Loading images with Java Plug-In in Internet Explorer

2000-10-12 Thread Damir Arh
Hello! Using the URL instead of regular file access did help. When thinking about it, it really is weird that it worked in Netscape, particularily because both were running it with the Plug-In. I ended up using: TextureLoader texLoader = new TextureLoader(getClass().getResource("checkered.gif"

Re: [JAVA3D] Transparency problems in Java3D 1.2

2000-10-12 Thread Uma Sabada
Damir: In your mail you mention that you use Java3D 1.3. Have you tried Java3D 1.2? Also, there will soon be the release of Java3D 1.2.1 beta that has some transparency bug fixes. If you have a test program that shows the bug, please send it to [EMAIL PROTECTED] Thanks Uma Java3D Team

Re: [JAVA3D] Including images in a jar file

2000-10-12 Thread Barry Walsh
I haven't tried this myself, but I have been told that the following might help. instead of ImageIcon icon = new ImageIcon(getClass().getResource("image.gif")); try: .getResourceAsStream(); I don't know the details, but some info is available at http://developer.netscape.com/docs/technote/ja

Re: [JAVA3D] Including images in a jar file

2000-10-12 Thread J. Lee Dixon
I am looking into using this right now for my web-based applet. Keeping images in the JAR file is an ideal way to go. First, this keeps all the class files and content files (3D models, textures) in one file. Downloading one file is faster than multiple files, also JARs are compressed which also

Re: [JAVA3D] Including images in a jar file

2000-10-12 Thread Gernot Veith
hi Damir, if your image is nested in folders like /images/test/image.jpg in a jar-file, you can get it with: InputStream in = getClass().getResourceAsStream("/images/test/image.jpg"); Now read bytes from the stream and create an image: Image img = Toolkit.getDefaultToolkit().createImage(bytes[])

[JAVA3D] Cannot include sound files in JAR in J3D 1.2

2000-10-12 Thread J. Lee Dixon
Well, I finished my conversion to keeping my content in JAR files and it works pretty well... one problem though. When it comes to placing sound files in the JAR, I remembered that the MediaContainer that takes an InputStream as a constructor is broken in J3D 1.2. As it stands, I cannot use getR