Links for working with OpenGL in Java using JOGL
Listed below are several links I found for working with Sun’s JOGL libraries.
The JOGL Project hosts a reference implementation of the Java bindings for OpenGL API, and is designed to provide hardware-supported 3D graphics to applications written in Java. It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems.
JOGL provides full access to the APIs in the OpenGL 2.0 specification as well as nearly all vendor extensions, and integrates with the AWT and Swing widget sets.
In order to make this all work, you have to actually install two sets of files. The first is the jogl.jar file — something most java programmers are used to working with — and the second is a set of .dll files. This last part caused me no end of trouble. In order for your code to run, you have to install two dll files, these are jogl.dll and jogl_cg.dll. The files need to be installed as follows:
- Copy jogl.jar into your $JAVA_HOME/jre/lib/ext directory
- Copy the two .dll files (jogl.dll and jogl_cg.dll) into $JAVA_HOME/jre/bin
Then, in your project, make sure you add the jar file to the classpath in order for your code to compile.
Here are the links I found that helped me:
- How to: Getting started with JOGL
- JOGL: A Beginner’s Guide and Tutorial
- The JOGL project website
- NeHe Productions - This site is not specific to Java, but it is an excellent resource for OpenGL and most tutorials include a Java version