Straighten 3D bindings and etc out...

Hi,

The termonology of standards and binding for doing 3D with Java is a ??? for me.
What is the way to go? JOGL / LWJ…something / Java3D…
What is the difference between em? What is the coverage on different platforms? etc.

thsi info is all over the boards, aprticualrly in clueless newbies. But really really fast.

JOGL – OpenGL binding. Standard being endorsed by Sun and the OpenGL ARB. Works well with AWT but also requries AWT.

LWJGL – OpenGL binding writing by Cas. Also includes input and audio (with OGL you have to use JIput for input and JOAL for audio.) Not as closely inetgrated with
AWT/Swing but also does not require them so the resulting run-time can be a bit smaller.

Java3D – Scenegraph API. A JCP standard. Has a bunch of stuff in it for Vis/Sim but has been sued successfully multipel tiems for games. Teo commercial Java3D games have been released (Roboforge, Law and Order)
Xith3D – An Alternate scenegraph written with games in mind.

Beyond that you start getting into hotly debated territory. People will claim one API is faster or slower then another, usually witha vested interest in one or the other, but at the end of the day no really reliable benchmarks have been written that exercise the right thinsg in the right ways to draw such conclusions.

Thanks for your reply Jeff. ::slight_smile:

So what I need is one of the API’s (JOGL or LWJGL) to get my hands on OpenGL.
And then the Scenegraph thingy is not really mandatory stuff? Could I go with bare binding to OpenGL and then manage my scene-stuff as I please?
I will definitively have a look at Scenegraphing anyways… but is it really needed?

How About mixing Graphics2D rendering, with any 3D stuff? Is that possible? Or do I have to remake all 2D blitting to bilboards?

Absolutely!

Not necessary at all. Its just a short-cut that does a bunch of work for you that you would otherwise have to code for your typical 3D app.

In the latest VMs a fair bit of work has been put in to making JOGL and AWT rendering nicely co-exist. If thats im[portant to you id definitely use JOGL (and grab mustang.) Otherwise, you can so Graphics2D to an offscreen image and then put it on textured polygon that is kept perpendicular and at a fixed distance to the view.
Thats how the HUD libraries people have written for Java3D work.

A note, Java3D BillboardBehavior really dont do what you want. Oriented shapes are better for this. (BillboardBehaviors unfortunately are asynchronous and thus you cna often see themn lag behind the change of the camera.)

We got LWJGL working nicely in AWT too now :slight_smile:
If you’re really interested in 3D you might want to look at Xith3D and jME as well.

Cas :slight_smile:

You might also want to check the JGO FAQ. Most of this is covered on there.

Kev