JOGL, LWJGL, GJ4Java in my situation?

Ya’ll know the Java-GL scene better than I do, so perhaps someone can give me an opinion about which of these three is most suited for my situation.

  1. 300,000 lines of code infrastructure already written and expressly designed to be single-threaded.

  2. Besides Windows, we need widespread MacOSX support within the next few months. This means not being limited to Developer Previews, but rather MacOSX versions available and in use with the general public.

  3. We need to be able to dynamically modify and replace textures during runtime, ie, can’t be limited to single-load textures.

  4. We run full-screen pure 3D… no windowed mode or Swing/AWT needed (or desired if not absolutely necessary).

  5. It doesn’t have to be fancy, complex, or overloaded with features. All I need is access to OpenGL in a library that won’t vanish in the next few years.

  6. Licensing must be that it’s freely usable (LGPL, etc).

  7. Must be able to run entirely from the current directory, preferably with a minimum number of files. ie, can’t require a dozen files to be installed in a dozen places throughout the user’s system.

And our current experiences with these:

LWJGL - we’re already coded for LWJGL. Versions 0.5 and 0.7 hard crashes on one of our NT4 boxes; the owner swears to having a modern 3D card with the latest video drivers. The lack of MacOS support is raising eyebrows. Either of these readily fixable soon?

JOGL - I can’t seem to get JOGL to run in a single-threaded mode (ie, without relying on event notifications) and the MacOS 10.3 requirement is slighly beyond our target audience but nominally acceptable. Will JOGL even be around for the long term with Sun’s new OpenGL proclaimation?

GL4Java - I can’t even figure out how to install GL4Java correctly. I’ve had zero luck getting anything to work there. Seems to throw files everywhere on install… will it work with all its files being in the current directory instead?

If somebody could give me a little direction here, I’d be eternally grateful.

It seems you’ve done the required analysis already.

Java3D is out since there is no MacOSX support (and chances are its not moving that way)

GL4Java is pretty dead now.

This leaves you with a choice between JOGL and LWJGL.

JOGL:

  • Based on a post in the JOGL forum from one of the SUN guys, JOGL will be around even with the SUN OpenGL announcement since both projects are originating from the same place.

  • There has been talk of a making JOGL work on older MacOS but no-one pushed for it. It is possible.

  • Unfortunaly, JOGL is dependant on AWT.

  • JOGL is BSD (last time I checked) so all should be healthly there.

  • Its quite a light install. One jar, a couple of libs at most.

  • The community around JOGL is pretty new and hence some of the bugs have yet to surface.

LWJGL

  • LWJGL has been around quite a while, with a health community support. I don’t see it going the way of the DoDo any time soon.

  • LWJGL has no dependance on AWT. Although this can make event handling slightly wierd, it generally respected as an nice option to have.

  • LWJGL is being cut down at the moment tho, to remove some of the functions of OpenGL that the authors don’t think are worth while.

  • LWJGL again is BSD licence, so hunky dory.

  • Again its a light install.

  • I suspect MacOSX support is on the way, but not heard anything recently.

  • The community for LWJGL seems a little stronger and more complete that over in JOGL which can be useful.

  • LWJGL contains alot more than just OpenGL bindings. Its got audio and control stuff also.

Functionally, both products can produce what you want.
Seems you have two factors to worry about really. MacOS and AWT dependancy. If you want guaranteed MacOS support, you’re going to need to go for JOGL right now. If you want to avoid AWT depednancy you need to go over to LWJGL. MacOS support should be coming on LWJGL (if its not already available? Cas? Matzon?). I’d go for LWJGL from your requirements, assuming you can get some confirmation from the authors about MacOS.

HTH

Kev

PS. Sorry for the long post.

Well, I am pretty much backing kevglass up on his statements.

Regarding Mac OS X:
We haven’t heard from swpalmer and gregorypierce in some time, so can’t give you an up to date assesment.
AFAIK, the input stuff for mac os x will be based on jinput. Cas, however would also REALLY like os x support! Both me and Cas have talked about getting access to an os x box, since we’d like to have os x support finished.

Regarding crashes, we’d really like to get some info about that… We are not aware of ANY crashing bugs in LWJGL. And when a crash occurs, it’s typically because of OpenGL drivers - I’ve been unable to launch a LWJGL Java Web Start application since SWING somehow interfers with OGL using CATALYST drivers. They just fixed the bug, in release 6 (3.6)!

Yes, we are very kind people, so posting crash logs on the lwjgl forums (here or over at puppygames.net) is considered a great help to improve lwjgl stability. If noone complains, we have no chance of fixing issues.

Regarding the MacOSX thing, well for now it’s tough luck. However, both me and Cas are so desperate for a port that either of us wil probably buy/steal the hw and do it. And lwjgl will probably work for all MacOSX versions, as I understand JOGL only work on 10.3 and up because of AWT changes. The eternal problem, however, is when all this will happen.

NOTE: Some code has already been completed in the MacOSX area by gregory, and if you have the hardware you could do the mac port. Yes, you. It’s not as hard as you might think (at least compared to the work of comleting 300k lines of code). Especially now when the LWJGL API is settling. I singlehandedly did the basic linux port starting from no GLX experience whatsoever in a few days. Really. A lot of issues had to be ironed out and polished after that, but basic rendering and input was done by that time.

Also, it’s nice to be a part of the LWJGL development, especially when you have a large project depending on our few but crucial lines of code.

  • elias

Much obliged for your time with your thorough replies. Looks like we’ll be sticking with LWJGL most likely, and will try to help tracking down the NT4 issue and hopefully providing some MacOS resources to the development team.

Elias neglects to mention that he’s extremely clever :slight_smile: so maybe it’s not as trivial as it looks to get just right! But a basic port that made stuff run should be within most people’s grasp within hours.

Cas :slight_smile:

I believe basic OpenGL is working for Mac OS X LWJGL.
The OpenAL stuff is almost working… the input side needs to be coded, Gregory Pierce has done the hard part of making some Java wrappers around the Mac OS HID APIs.