| Introduction to Java and OpenGL
Return to the main FAQ page for more questions and answers.
1. What Java-based OpenGL APIs are available?
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. The official bindings to OpenGL is called JOGL and is the basis for the work on JSR 231. Along with this is an accompanying JSR 239 for bindings to the OpenGL ES specification. 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.
2. Isn't using Java to do OpenGL going to be slow?
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.
3. What Platforms does Java + OpenGL run on?
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.
4. What Java-based Scene Graph APIs are available?
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) $ |