Computer Graphics
Børre Stenseth

JOGL

There has been numerous softwareprojects binding OpenGL to Java. The author has experience with two of them: Magician and Gl4java [1] . Both are discontinued, and since 2007 JOGL [2] seems to be the natural choice for simple development in Java.

Setup

Which strategy you choose is up to you. My choice is to use NetBeans, also for OpenGL-development.

Direct download

You may go to the JOGL homesite [2] , download the needed libraryfiles and include them in your working environment. You will find more information at JOGL installation [3]

NetBeans

If you use NetBeans 6.5+ [4] , a set of plugins for OpenGL-development based on JOGL is available. I have used this plugin for versions 7.1 and 7.2, but not for version higher versions. Select plugins and search for: "NetBeans OpenGL Pack".

If you go for the NetBeans solution you simply.

  • download the zipped plugin
  • unzip it, and find a series of nbm - files
  • start NB and select Tools/Plugins
  • select tab: Downloaded and locate your unpacked files
  • Ignore the shading language editor(glsleditor.nbm)

Once installed you have a lot of support for your OpenGL development:

  • 3 template projects, File / New Project, select Java
  • a series of examples, File / New project, select Samples / Java/OpenGl
  • access to description of the OpenGL implementation, select Tools / OpenGL Capabilities

The first thing you may want to do is to select File / New Project, and select "JOGL Application (Form Designer,GL Canvas)".

Run it and you should get something like this:

screen1

Some issues

NOTE: that you may get som problems running my examples directly in Windows from Netbeans. You get some warning related to 32 64 bits problems. There are some suggested solutions to this on the net, but a simple hack is to change the JavaPlatform in your project-properties-libraries to a 32-bit java/jre. Not very clever, but it works

NOTE:You may also have som problems with the versioning in Netbeans. The easy way out is to version the project directly on a catalog on your harddisk.

References
  1. GL4JAVA, OpenGL for Javagl4java.sourceforge.net/14-03-2009
  1. JOGL, Javabinding for OpenGLjogamp.org/jogl/www/14-04-2009
  1. JOGL, Installationwww.tutorialspoint.com/jogl/jogl_installation.htm14-04-2009
  1. NetBeans idewww.netbeans.org/14-03-2009
Maintainance
til toppen