Returned to a project, upgraded lwjgl and it crashes out...

Started by Hungry Joe, March 01, 2004, 19:04:24

Previous topic - Next topic

Hungry Joe

Hi there, I am running WinXP with a GF2MX.  I upgraded to the current lwjgl from 0.7 and found a couple of lines about windows refresh rate needed updating. Now I can't get my code to run.
Quote
Stack trace:

java.lang.UnsatisfiedLinkError: nCreate
   at org.lwjgl.opengl.Window.nCreate(Native Method)
   at org.lwjgl.opengl.Window.createWindow(Unknown Source)
   at org.lwjgl.opengl.Window.create(Unknown Source)
   at Game.init_Window(Game.java:65)
   at Game.<init>(Game.java:35)
   at Game.main(Game.java:204)
Exception in thread "main"

and here is init window. what seems to be wrong?

Quote
public void init_Window(int width, int height, int bpp) {
      try {
         // Find the display mode
         DisplayMode[] modes = Display.getAvailableDisplayModes();

         for (int i = 0; i < modes.length; i++) {
            if (modes.width == width
               && modes.height == height
               && modes.bpp >= bpp) {

               mode = modes;
            }
         }

         // Start in windowed mode
         
         Window.create(
            "GL Test",
            50,
            50,
            mode.width,
            mode.height,
            mode.bpp,
            0,
            8,
            0);

         init_gl();

         Keyboard.create();
      } catch (Exception e) {
         e.printStackTrace();

      }

princec

Grab the latest from CVS and rebuild the dll. If the Java compiles, you won't be getting any unsatisfied link errors.

If you can't build the dll drop me a line and I'll send you a fresh one. (Preferably to my work email caspian.prince@consiliumcpm.com so I can use my work broadband connection :P)

Cas :)

Hungry Joe

cheers for the .dll, but its still no' right!

it gets a bit further this time, throwing out this at the stack

Quotejava.lang.UnsatisfiedLinkError: glMatrixMode
   at org.lwjgl.opengl.CoreGL11.glMatrixMode(Native Method)
   at Game.init_gl(Game.java:87)
   at Game.init_Window(Game.java:76)
   at Game.<init>(Game.java:35)
   at Game.main(Game.java:204)
Exception in thread "main"

this is my init GL

Quotepublic void init_gl() {
      
      // Setup perspective mode
      GL.glMatrixMode(GL.GL_PROJECTION);
      GL.glLoadIdentity();
      GLU.gluPerspective(
         45.0f,
         (float) mode.width / (float) mode.height,
         1.0f,
         150.0f);
      GL.glMatrixMode(GL.GL_MODELVIEW);
      
      // Set clear color to black
      GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

      // Sync frame (only works on windows) also called vSync...      
      Window.setVSyncEnabled(true) ;
   }

thanks in advance, P

princec

You're not using the JAR I sent you to compile against. There is no longer even a CoreGL class - it's called GL11.

Cas :)

Hungry Joe

you're right! I just came back to tell you not to bother reading this, i was just confiused in Eclipse! thanks tho.


Matzon

the native one did - now it's gone into org.lwjgl.opengl.glu instead and is implemented in pure Java