Introduction to Java and OpenGL
Return to the main FAQ page for more questions and answers.
There have been many attempts at producing Java bindings to OpenGL over the years. Some are now dead (Magician, GL4Java), while others are still in active development.
LWJGL is a community-driven binding that takes a different approach than JOGL and layers in a lot of other functionality, such as audio and input devices.
The simple answer is: No. All the demos written and large scale applications are running within 10% of the speed of their C++ equivalents (eg conversions of the NeHe tutorials). This assumes you write your code reasonably optimally. Making large numbers of glVertex() calls will make your code much slower than the C/C++ equivalent due to the JNI overheads. Using the same optimisation strategies as professional applications, such as vertex buffers, will have your Java code running just as fast and the native versions.
They will run on all platforms where OpenGL and a JDK is available. JOGL is known to run on Linux, Win32, most Unices and Mac OSX 10.3 or later. Earlier versions of Mac OS are not supported due to requirements for JDK 1.4.2 or later.
There are a number of projects to build scene graphs over the top of the various Java OpenGL bindings. The following is a short summary of each of the known major players:
Aviatrix3D: Based on JOGL, it is oriented towards large-scale visualisation. Aims to be completely extensible, supporting everything from single processor desktops to multiprocessor/pipe and clustered rendering systems.
jME: A scene tree-based API built over the top of LWJGL, designed specifically for the gaming market. Contains a large collection of high-level primitives, such as particle systems, NURBS, terrain rendering etc.
Xith3D: Originally designed as a complete drop-in replacement for Java3D, but optimised for the gaming market (single CPU and graphics card). While the API is still currently almost identical, it is slowly diverging as it picks up more advanced capabilities, such as shaders, offscreen rendering etc.
[ j3d.org Home ]
[ Java OpenGL ]
[ Aviatrix3D ]
[ Tutorials ]
[ Books ]
[ Contact Us ]
Last Updated: $Date: 2010-01-27 21:23:17 -0800 (Wed, 27 Jan 2010) $