JOGL Running Problems

Hey,

I made an old project with JOGL in Netbeans 5 and left it in a working state.

I came to do some more on it today although i am now using Netbeans 6 and the latest JOGL feb build, and i was getting library errors with the jogl.jar file, so i thought ok screw it lets download the OpenGL packs for Netbeans 6. All went in fine and loaded up the JOGLCapsTableDemo and works fine…

So after a bit of messing around i just cleared EVERYTHING related to the project and made a new one from scratch with the source code, now it seems to be loading up but as soon as the window comes up it bombs out with the error:

Exception in thread “Thread-2” javax.media.opengl.GLException: java.lang.UnsatisfiedLinkError: C:\Documents and Settings\user.netbeans\6.0\jogl-runtime\jogl.jar-natives-windows-i586\jogl_cg.dll: Can’t find dependent libraries

Now that directory exists, and it all seems to be set up correctly, and i cant seem to debug it as i have 2 projects, one is a framework and the other uses the framework. Anyway i was wondering if anyone else has had problems when it comes to using the latest build of JOGL?

Let me know if you need any specific details, any advice would be great!

So you installed the latest OpenGL pack, created a SimpleJOGL app and copied your source to it, am I right? If you did additional steps, please list them. Also make sure you don’t have any jogl/gluegen related files in your systems JRE/JDK or windows\system32 folder.

hi,

you imported the nb5 config into netbeans 6?
does this help:
http://www.java-gaming.org/forums/index.php?topic=18666.0
?

if yes this will be fixed in the next version.

Sorry for the inconvenience.

[EDIT] if you haven’t updated to the latest OpenGL Pack to 0.5.2 the old (nb5) pack will not work with nb6 because of api changes in nb6

Hey,

Sorry been away from the office, it was a netbeans 5 project, but i completely removed everything relating to the NB5 project and just copied the shell from the simpleJOGL app because the initial one was just bombing out saying it couldnt find the libraries.

It loads up the window using the new project, but it just seems to bomb out after that, but after going through the code trying to debug it… it seems like some things are not being set… Although it just keeps spitting out the Unsatisfied Link Error, and im like 99.9999% sure this was working last time i was using it, and if i wasnt i would expect a different error other than Unsatisfied Link Error.

-Edit-

After doing some more debugging it appears that the reason some things are not being set is because there is a call to:


cgcContext = CgGL.cgCreateContext();

This line here goes into GLDrawableHelper and runs the following code:

(GLDrawableHelper.java)


} finally {
        try {
          if (res != GLContext.CONTEXT_NOT_CURRENT) {
            context.release();
          }
        } catch (Exception e) {
        }
        if (lastContext != null) {
          int res2 = lastContext.makeCurrent();
          if (res2 == GLContext.CONTEXT_CURRENT_NEW) {
            lastInitAction.run();
          }
        }
      }

Then it bombs out… if i remove the Cg initilisation from the program and just let it fall back on GL based rendering it works ok…

Has there been any major changes to Cg in JOGL over the past 6 months?