LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: gmaletic on October 21, 2005, 20:31:53

Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: gmaletic on October 21, 2005, 20:31:53
I followed the instructions for downloading and using LWJGL on Mac OS X 10.4.2, but when I try to run the first sample application I get an error. I type:

java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar -Djava.library.path=native org.lwjgl.test.WindowCreationTest


...and I get the following output:

The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Found 26 display modes
Problem retrieving mode with 640x480x24@75
Problem retrieving mode with 800x600x24@75
Problem retrieving mode with 1024x768x24@75
Exception in thread "main" java.lang.UnsupportedOperationException
       at java.nio.IntBuffer.array(IntBuffer.java:903)
       at org.lwjgl.opengl.MacOSXDisplay.setIcon(MacOSXDisplay.java:548)
       at org.lwjgl.opengl.Display.setIcon(Display.java:855)
       at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:126)
       at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:320)


Anybody know what's going on here?

Thanks very much,

Greg
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: Matzon on October 21, 2005, 21:54:20
is that 0.98 ?
I know it's a bug thats fixed - caused by a direct/non-direct buffer issue
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: gmaletic on October 21, 2005, 22:00:24
Yes, it's 0.98. At least, it's the file that I downloaded from:

http://easynews.dl.sourceforge.net/sourceforge/java-game-lib/lwjgl-macosx-0.98-1.zip
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: arthur ringworn on October 23, 2005, 12:23:42
I've got this same exception with a 0.98 on Panther too.
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: Matzon on October 23, 2005, 13:33:57
this is a know bug, and has been fixed in cvs. I somehow thought that this was fixed in 0.98-1, but apparently this isn't the case.

It's a simple fix - but if you only use the binary distribution you will need a patch file until the next release.

I have created a patch file, please include in classpath BEFORE the lwjgl.jar:
http://lwjgl.org/osx_set_icon_patch.jar
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: arthur ringworn on October 23, 2005, 14:22:32
Cheers.

Now I get:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/lwjgl/opengl/MacOSXDisplay (Unsupported major.minor version 49.0)

Is this because I'm only on Java 1.4.2?
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: Matzon on October 23, 2005, 14:37:35
doh - I have posted a new one
Title: Problems with LWJGL on Tiger
Post by: espressit on November 07, 2005, 05:31:19
Hi, I have the same problem occuring as previous poster. I downloaded http://lwjgl.org/osx_set_icon_patch.jar and put in classpath before lwjgl.jar, but still have same problem occurring.
Can you point me in the right direction with this?
Thanks
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: Matzon on November 07, 2005, 07:02:29
Hmm, not sure whats going on then... sure it's the exact same error? - it should not be possible...
if it fails, you could try and surgically add the files from the patch file into lwjgl.jar, replacing the Mac display files in lwjgl.jar
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: numberR on November 10, 2005, 07:59:12
i opened up lwjgl.jar and updated files, but it didn't help.
i got this following error:

The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Found 36 display modes
Problem retrieving mode with 640x480x24@75
Problem retrieving mode with 800x600x24@75
Problem retrieving mode with 1024x768x24@75
Problem retrieving mode with 1024x768x32@75
Exception in thread "main" java.nio.BufferUnderflowException
       at java.nio.DirectIntBufferU.get(DirectIntBufferU.java:221)
       at java.nio.IntBuffer.get(IntBuffer.java:674)
       at org.lwjgl.opengl.MacOSXDisplay.setIcon(MacOSXDisplay.java:552)
       at org.lwjgl.opengl.Display.setIcon(Display.java:855)
       at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:126)
       at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:320)


i get the same error as the poster reported if i don't update files.
i'm on Mac mini running Mac OS X 10.4.3.
byte order issue?
Title: Problem setting up LWJGL on Mac OS X Tiger
Post by: numberR on November 10, 2005, 08:43:30
http://metawire.org/~numberr/data/lwjgl.jar
i compiled it from cvs, and should include the fix to the problem.
it worked for me, at least.
so try it but make sure to use it just to confirm setIcon works or not.
after you have checked, just throw it away and wait for official release :)
Title: It works!
Post by: gmaletic on December 15, 2005, 00:05:15
Quote from: "numberR"http://metawire.org/~numberr/data/lwjgl.jar
i compiled it from cvs, and should include the fix to the problem.
it worked for me, at least.

Yes, it works. Thanks!