LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: llewmason on April 17, 2004, 19:39:28

Title: First problem converting to 0.9
Post by: llewmason on April 17, 2004, 19:39:28
On MacOS X:

Exception in thread "main" java.lang.UnsatisfiedLinkError: nIsVisible
   at org.lwjgl.opengl.Window.nIsVisible(Native Method)
   at org.lwjgl.opengl.Window.isVisible(Unknown Source)
   at org.lwjgl.opengl.Window.update(Unknown Source)

First time I call Window.update().

The same code worked on 0.7 just fine.

Note that a whole bunch of LWJGL calls succeeded before this, including creating the OpenGL context, etc.  So it doesn't seem to be related to the native lib not being found.
Title: First problem converting to 0.9
Post by: llewmason on April 17, 2004, 19:51:44
Alright, forget my code:

java -classpath ".:./lwjgl_test.jar:./lwjgl.jar" -Djava.library.path=. org.lwjgl.test.WindowCreationTest

Fails with same error:

Found 16 display modes
Window created
240, 320, WindowCreationTest
Exception in thread "main" java.lang.UnsatisfiedLinkError: nIsVisible
       at org.lwjgl.opengl.Window.nIsVisible(Native Method)
       at org.lwjgl.opengl.Window.isVisible(Unknown Source)
       at org.lwjgl.opengl.Window.update(Unknown Source)
       at org.lwjgl.test.WindowCreationTest.main(Unknown Source)
Title: First problem converting to 0.9
Post by: elias on April 17, 2004, 21:37:11
Yeah well...

Mac OS X is not very supported at the moment. The simple reason is that we don't have neither a dedicated Mac nor a dedicated Mac developer. You'll have to indulge the bad OS X port until we find someone to maintain it (eventually I plan to buy a mac and do it myself, but at the moment I'm too busy)

- elias
Title: First problem converting to 0.9
Post by: llewmason on April 18, 2004, 00:17:40
Actually, given that I'm primarily using LWJGL on Mac OS X now (unless my wife wants to use the Dual G5, in which case I'm back on the P4), I'd be interested in helping to maintain it.

I guess no one tried 0.9 on Mac OS X at all, given that I just looked, and sure enough, no one implemented nIsVisible for the Mac OS X port.
Title: First problem converting to 0.9
Post by: llewmason on April 18, 2004, 01:03:34
OK.

I downloaded the source.

Went through a few minor issues (no OpenAL installed, LWJGL build.xml Ant script appears broken somewhat on Mac OS X).

Added the nIsVisible function.

Recompiled.

All my code now runs flawlessly on v0.9.

btw.  Took me around 10 minutes of actual Java code changes.  All my sound usage was encapsulated in a Sound and SoundService class.  All my OpenGL usage was encapsulated in a GraphicsService class.  No changes required outside those three classes to get 0.9 running from my existing 0.7 based codebase.
Title: First problem converting to 0.9
Post by: llewmason on April 18, 2004, 01:14:47
BTW.  Here's the diff for someone who can check changes in:


src/native/macosx/org_lwjgl_opengl_Window.cpp

> JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsVisible(JNIEnv *env, jclass clazz) {
>       return JNI_TRUE;
> }
Title: First problem converting to 0.9
Post by: Matzon on April 18, 2004, 03:08:08
QuoteChecking in org_lwjgl_opengl_Window.cpp;
/cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Window.cpp,v  <--  org_lwjgl_opengl_Window.cpp
new revision: 1.37; previous revision: 1.36
done
thanks