The Source for Java Technology Collaboration


Should I use JOGL or LWJGL?

Now, thats a good question! With respect to OpenGL they provide the same thing with a slightly different API. Performance wise its too close to call, so which one should you use?

JOGL - Its developed by SUN, so one day it might become part of the JVM. It uses an object based API (which is a matter of taste). Its not been around very long but supports everything in OpenGL. If you want to use sound and input you'll need to use two additional projects (JOAL and JInput). JOGL makes use of AWT and can be used in conjunction with AWT's OpenGL acceleration pipeline making it easier to integrate with other Java UI components and non-game applications. JOGL uses AWT and/or Swing, and can render in AWT "heavyweight" or Swing "lightweight" contexts, although in pre-Java 1.6 JVMs rendering lightweight can induce a performance penalty that may be significant.

LWJGL - Its developed by a group of indie developers, so it'll always be seperate from Java (which does of course give it an independent view), but support could wain eventually. Its been around a long time though and does have some commercial releases. It uses a static's based API (which again, is matter of taste). LWJGL bundles OpenGL, OpenAL and Input into one package. It does not use AWT and claims to use fewer JNI calls than JOGL, which avoids some overhead, and is targeted more specifically to games.

The best advice is probably try some small test in both and see which API suits you.

Topic WhichOpenGLBindingShouldIUse . { Edit | Ref-By | Printable | Diffs r2 < r1 | More }
 XML java.net RSS

Revision r2 - 28 Nov 2005 - 21:09:34 - Main.samkass
Parents: WebHome > FAQ