A small skirmish flaired up on the OCJUG mailing list revolving around Java OpenGL libraries. In paticular, which to use: JOGL or Java3D?
JOGL is a thin wrapper around the OpenGL C libraries - much like how GWT and SWT is a thin wrapper around platform native widgets (or DOM), relying on another layer of code to provide platform-independence. JOGL is being actively developed by Sun's "Game Technology Group" (I couldn't find a link to that organization within Sun, though.) It was used to code Aerith, a scorchingly hot Java demo that uses some great UI design, and some remarkable Java2D and JOGL compositing.
Java3D is a thick system, similar to AWT. It supports both DirectX and OpenGL rendering, and supports a much higher level of functionality than JOGL. But it has mostly been abandoned by Sun. It's story is a sad story.
What is the conflict? It revolves around whether Java3D was ever justified in the first place. So essentially it is a battle over historical interpretation. One side claims that Java3D had some real utility when OpenGL was not ubiquitous and DirectX needed support, and when limitations of JVM performance made "retained mode scene graph" APIs desirable because they push processing out of the VM [I'm not really sure how that works, though].
One things for certain: JOGL is not for the feint of heart. It is low-level and definitely not object-oriented. According to this article "the GL class' Javadocs list 2,433 fields and 1,856 methods!" That's a lot of members! This leads me to believe that JOGL is a necessary but not sufficient condition for writing 3D applications in Java. More abstraction is necessary, and that abstraction may well turn out to look like Java3D.
Those looking to write 3D games in Java would do well to check out Bytonic Software's port of Quake 2 to Java. The Quake 2 game engine was open-sourced (GPL) by id software in 2001. Now it has been ported by a group of industrious German students to Java - and they even have a working webstart deployment. Of course, they used JOGL. I haven't looked at the code, but even if it's a mess, it seems like a better place to start than from scratch.
No comments:
Post a Comment