Long JOGL Loading Times

I’m not sure if this is a JOGL specific problem, but I do know that applets seem to load up fast enough when I’m not using JOGL to avoid this problem. What happens, is the Java loader pops up, then disappears and the screen stays white for an extended period of time before the game finally loads up, which generally seems to take about 15-20 minutes. I’m on high speed internet, and the size of all the files for the game are around 3 MB, so a 15 minute load time strikes me as a bit off.

I’ve even had times where the applet never loads at all, and this behavior is the same on the 3 different computers I’ve been testing on.

I thought that maybe I needed to implement a class loader or something like that, but after doing a few more tests the problem almost seems to be more. In my applet init function, I added a message popup. When the applet launches in browser, the popup appears almost immediately. But, If I leave the popup up, after about 30 seconds the popup disappears and the Java frame goes white. I’ve put more popups after the first one, and none of them pop up after it turns white, which seems to signal that nothing is actually happening while the screen is white. I’ve also set up a threaded asset loader, and the GLCanvas is supposed to be painted black immediately when it’s initialized, which doesn’t happen.

What could I be doing that’s causing this?

EDIT: I actually managed to fix the crash error, but now I’m back to an older problem of incredibly long loading times. I’ve set up popup messages, and the GLCanvas initializes fairly quick, and the first display call is called quickly, but then there are incredible amounts of time between each display call( 1-5 minutes ). Interestingly enough display is getting called whenever I change focus away from the applet (open a different tab, etc).

Are you using an animator to automatically call display()? GLCanvas has repaint() hooked up to call display() so it is likely that the focus changes and other events are triggering those displays.

Yes, I do have an animator hooked up. It seems like the animator isn’t updating because something is still loading. I’ve stripped down my applet to a simple OpenGL initialization followed by drawing a simple image, and it won’t even run in browser anymore. I’m using Netbeans and I’ve tested it using webstart, and it works. I’ve also tried running the Launch.html that Netbeans creates, and it runs in browser perfectly. The second I upload the files to the internet, though, they stop working.

EDIT: I’ve discovered that the applet runs if I keep trying over and over and over again. The first thing I’m doing is setting the applet background color to red. 90% of the time, I open the page, and the browser locks up for 5-10 seconds, then the applet frame flashes red and disappears. BUT, If I refresh at this point and keep doing so every time it crashes, the applet will eventually stay red, and load properly.

What version JOGL are you using?

I’m using 1.1.1a, which came in the Netbeans OpenGL pack. Is there a newer version? :o

I managed to get the applet launching almost faithfully by adding these lines to the header of the HTML:

But the loading time for the applet is still fairly painful ( 3 - 4 minutes ).

Aha yes, you are using a loooong outdated version. The current recommended version is 2.0 Release Candidate 2.

EDIT: The download page might be somewhat confusing. To find the JOGL release, scroll all the way down and look for “jogl-[versionNum]-[operatingSystem].7z”

ra4king is right. The JogAmp foundation has no control on Oracle servers and JOGL is maintained by the JogAmp foundation.

I’ve upgraded my project to use the latest JOGL2 build, but now I can’t use the Netbeans OpenGL pack, so I once again get to struggle with trying to figure out JNLP files. The game runs fine when I run it normally, but if I try and run it through Web Start, or through the browser, I get this error:

Exception in thread “Thread-12” java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)
at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
at com.jogamp.common.jvm.JVMUtil.(JVMUtil.java:56)
at javax.media.opengl.GLProfile.(GLProfile.java:1141)
at javax.media.opengl.awt.GLCanvas.(GLCanvas.java:221)
at javax.media.opengl.awt.GLCanvas.(GLCanvas.java:178)
at javax.media.opengl.awt.GLCanvas.(GLCanvas.java:169)
at pixelgame.core.CCore.(CCore.java:177)
at pixelgame.core.CCore.Instance(CCore.java:78)
at pixelgame.core.CGLStarterThread.run(CGLStarterThread.java:56)

How should I go about setting up the JNLP and HTML to launch my new JOGL2 app? I’ve tried a number of changes to the original JNLP with no success, and I’ve tried using the JNLP Applet launcher(described at the bottom of this page http://www.ntu.edu.sg/home/ehchua/programming/opengl/JOGL2.0.html), but of course, I got the old “Class not found” error that absolutely everyone seems to get with no solution.

This means it can’t find gluegen-rt.jar in your classpath. It is supposed to be in the “lib” folder of the JOGL zip file.

When it builds it puts that file along with nativewindow.all.jar, jogl.all.jar and newt.all.jar into the lib folder alongside the jar. I think it’s issue is that it doesn’t know how to find gluegen-rt.dll/.so/.yoursystemlibraryextensionhere. To fix that I imagine I have to tell the JNLP to download the library from the internet somewhere, but I’m unsure how to do that. Unless I just have the JOGL jars in the wrong place?

EDIT: Wait, am I supposed to distribute the JOGL Zip with my Jar?

Hi!

I explained how to setup Netbeans without the pack here, maybe it could be useful for you:
http://tuer.sourceforge.net/download.php