Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compiled LWJGL with GCJ  (Read 1704 times)
0 Members and 1 Guest are viewing this topic.
Offline vrm

Junior Member




where I should sign ?


« Posted 2003-05-19 20:31:28 »

compiled whole LWJGL with gcj 3.3  Cool

it's far more completed than previous version

part of java.awt is missing (like we care Grin)
javax.swing is missing (like we care at all Grin)
javax.imageio is missing not really important but needed for some examples I tried to run

I compiled with ant, (tweaked the build.xml for change compiler and it worked)

I'm trying to run the bytecode, but it's asking the _d debug lib

I don't remeber how to build it , elias explained me once Sad

vrm@vrm:~/LWJGL/lib$ gij -cp examples.jar:lwjgl.jar Polygon
Exception in thread "main" java.lang.UnsatisfiedLinkError: lwjgl_d: file not found
  at java.lang.Runtime._load(java.lang.String, boolean) (/usr/lib/libgcj.so.4.0.0)
  at java.lang.Runtime.loadLibrary(java.lang.String) (/usr/lib/libgcj.so.4.0.0)
  at java.lang.System.loadLibrary(java.lang.String) (/usr/lib/libgcj.so.4.0.0)
  at org.lwjgl.Sys.initialize() (Unknown Source)
  at org.lwjgl.Sys.<clinit>() (Unknown Source)
  at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0)
  at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.4.0.0)
  at BaseWindow.start(int, int, int, boolean) (Unknown Source)
  at Polygon.main(java.lang.String[]) (Unknown Source)


next step is binary compile

I hope it's going to be small or at least gij is small and efficient (/me looks at sun bloated JRE)
Offline Jacko

Junior Member





« Reply #1 - Posted 2003-05-19 21:34:28 »

Think you'll run into more problems than just that I think. The direct bytebuffer implementation isnt there yet, just stubs to be filled in later, which is the real killer for using lwjgl with gcj at the moment.

And gij is just an interpreter so I wouldnt expect much performance out of that.
Offline vrm

Junior Member




where I should sign ?


« Reply #2 - Posted 2003-05-20 06:40:50 »

hehe

vrm@vrm:~/LWJGL/lib$ gij --cp ./examples.jar:./lwjgl.jar Polygon
Removed 0 duplicate displaymodes
Exception in thread "main" java.lang.Error: direct buffers are not implemented
  at java.nio.ByteBuffer.allocateDirect(int) (/usr/lib/libgcj.so.4.0.0)
  at org.lwjgl.input.Keyboard.<clinit>() (Unknown Source)
  at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0)
  at _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/libgcj.so.4.0.0)
  at BaseWindow.createGLWindow(int, int, int, boolean) (Unknown Source)
  at BaseWindow.start(int, int, int, boolean) (Unknown Source)
  at Polygon.main(java.lang.String[]) (Unknown Source)


anyway it's far better than the first time I tried Smiley
I managed to compile
wait & see
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline AndersDahlberg

Junior Member





« Reply #3 - Posted 2003-06-02 17:11:05 »

UPDATE: downloading and compiling gcj 3.4 (e.g. cvs version)

looking at java/nio/DirectByteBufferImplementation.java I believe they have a working implementation on big endian machines (almost all methods contains FIXME: this only handles big endian)

So it shouldn't be long until compiling lwjgl with gcj becomes a reality! Smiley
Offline vrm

Junior Member




where I should sign ?


« Reply #4 - Posted 2003-06-04 10:17:14 »

nice, I would like to help, but I'm in a long buisness travel
Offline AndersDahlberg

Junior Member





« Reply #5 - Posted 2003-06-05 16:37:38 »

Hehe, this sure isn't easy, but here are my findings so far:

downloaded and installed gcj 3.4 from cvs to /usr/local (enable-languages=c++,java) - no problems

downloaded and installed openal from cvs to /usr/local - no problems

downloaded and compiled lwjgl from cvs (regular build)

compiled lwjgl java sources with gcj -fjni ... and linked to form a "native" shared library.

compiled the PolygonColoured example by compiling PolygonColoured.java and BaseWindow.java with gcj and linked them up with previous built lwjgl libraries

Everything ok so far -

Though it doesn't work  Wink

running PolygonColoured is ok  (ie window shows up and some dumps of supported opengl extensions are shown in the console) until the glu is used to set up some view point (?) in BaseWindow.java.

there it crashes out with a SIGABORT or something like that Sad

Maybe next time - or somebody else might get lucky Wink
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2003-06-05 17:29:05 »

Actually y'all have been worried about the complete lack of buffers in GCJ when of course there's nothing stopping you writing your own wee DLL with your own ByteBuffer class in it and tweaking the LWJGL to use it (seeing as we use ints everywhere all you really need is basically malloc() and free(), and some put/get methods)

Cas Smiley

Offline AndersDahlberg

Junior Member





« Reply #7 - Posted 2003-06-05 18:09:36 »

As I said before, I believe there now is a (limited) working solution of buffers (and rest of java.nio) available in cvs - not sure what went wrong above but it sure looks like same old buffer problem though.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (19 views)
2014-09-21 02:42:18

BurntPizza (14 views)
2014-09-21 01:30:30

moogie (14 views)
2014-09-21 00:26:15

UprightPath (25 views)
2014-09-20 20:14:06

BurntPizza (27 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (73 views)
2014-09-10 13:57:51

TehJavaDev (96 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!