Java3D vs JOGL vs LWJGL

vs …

This was proably already asked but I could not find it with the search tool.

I want to make a game in JAVA with 3D graphics. I played a bit with Open GL in C++, a bit with JAVA 3D, and a bit with JOGL.

As a result of looking everywhere, I am now totally confused by all the options offered.

JAVA 3D -> pros: Decoupling from DirectX/OpenGL. Cons: Not sure about performance.
JOGL -> Pro: I like OpenGL. Con: Seems more performant than JAVA3D (??).
LWJGL -> Pro: Seems interesting. Cons: Not sure I fully understand the scope, is the team big enough to support it, advantages vs JOGL?

Can anyone help?

What comes to Java3D, I think you should compare it to scenegraph apis, its not appropriate to compare it only to jogl or lwjgl wrapper libraries.

OpenGL wrappers: JOGL, LWJGL
There are two major native OpenGL wrappers for java. They both try to solve the same problem but with different style.

To put simple, they just take triangles and draw them on a screen. Higher level services such as model loaders can be found from community libraries and toolkit libraries. Some services are already embedded to wrapper’s project base though.

Its very laborous to do an extensive game with only using wrapper codebase.

Scenegraph api: JME and Xith3d
http://jmonkeyengine.com/
Higher level api to provide useful toolkit for creating apps. APIs use either jogl or lwjgl for gfx rendering part.

Maybe you should look at the JME and Xith3d demo apps first. Just looking at the jogl, lwjgl demos first might confuse because using them you really program a low-level opengl api. Its always nice to know that its there available if you really need to do some fancy things.

This is how I would grade them all (Note: I am a LWJGL developer, so I am obviously biased):
Scenegraphs:
Java3D: if you’re doing enterprise like applications (Java3d is a scene graph)
Xith: if you’re doing games and want a Java3D like api
jMe: if you’re doing games and want another approach than xith. (since I’ve used neither actively, the lines are a bit blurred with these two apis)

OpenGL bindings:
JOGL: if you’re doing enterprise applications (LWJGL should do fine too, but it’s the only reason I could come up with for choosing either one of the apis)
LWJGL: if you’re doing games, particularly fullscreen games
GL4Java: old, obsolete - just avoid it.

Since you’re going to do games I would suggest either jMe or Xith if the game is anything but simple. I would also suggest using LWJGL when using either jMe or Xith simply because I believe its more mature.

meh- whome beat me to it >:(

i think there is a bit more detail on this thread:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=announcements;action=display;num=1110483233

Dan

Can we make this thread a sticky? It’s got a great title and great replies.

Cas :slight_smile:

Thank you. The above mentioned thread is very helpful.

Now, I have to make a choice.

Rest assured LWJGL has far and away the most responsive dev team in this area :slight_smile: And also the best track record in delivered products.

Cas :slight_smile:

You should also look at AgentFX the grahpic egine behind Megacorps. The engine consists of 2 modules, a rendering engine and a high-level API

The high-level system is for rapid development of virtual environments. It gives a developer every thing he/she needs to control a world. You got bone animation, collision detection, live dynamic lights and shadow volumes. I think that AgentFX is still the only java scene graph with support for very large world with octrees and portals. A scene can be loaded directly from .obj file without any preprocessing and everything runs smoothly.

The rendering system is a state based scene graph that allows you to do practically everything that is possible to do in a system such as OpenGL(JOGL, LWJGL). Since the system is object oriented it is very easy to extends objects and give them properties such as flickering light, animated textures etc.

Cheers
// Tomas
Note! I might be a bit biased :wink:

You find AgentFX at: www.agency9.com :slight_smile:

i’d recommend lwjgl, its small, fast and maintained at a steady pace. also it gives you access to all the stuff needed for games development and lets you just get on with the job.

[quote]Not sure I fully understand the scope, is the team big enough to support it, advantages vs JOGL?
[/quote]
yes the team is pretty competent and skilled to support it
(at least from my observations, i hope ;D), latest release was yesterday, development it moving at a very nice pace.

as for advantages one that pops to mind is that lwjgl has a much lighter memory footprint as it less intangled with awt.