EclipseOpenGL
Search:
BigScreens / EclipseOpenGL

Processing with OpenGL in Eclipse

First, if you haven't, please read the Processing in Eclipse tutorial. This only has the additional information for using OPENGL in your application.

  1. In order to use OPENGL, you should copy the following two files into your project:
    • Processing XXXX/libraries/opengl/library/jogl.jar
    • Processing XXXX/libraries/opengl/library/opengl.jar
    • If you are on a mac, also copy all files from the above directory that start with libjogl, i.e. libjogl.jnilib, libjogl.so, etc.
    • If you are on a PC, copy all files that end with the extension DLL.

A couple notes about step 1. First, you do not have to copy the files into your project if you don't want to, you can always point to them in the Processing folder. However, if you move Processing, your application will break. In addition, by copying the files into the project directory, they will be included when you share it via CVS, and this is a good thing. Oh, you may want to consider copying all of these files into a folder called "opengl", rather than just dumping them in the project root directory.

  1. Add jogl.jar, opengl.jar, and gluegen-rt.jar to the build path. You can do this by right-clicking and selecting: BUILD PATH --> ADD TO BUILD PATH.
  2. Once they are in the build path, right-click on jogl.jar and select "Properties." Then select "Native Library." Assuming you copied the JNILIB files (mac) or DLL files (PC) into your project, select: "Workspace" and pick the folder that contains these files. Repeat this step with gluegen-rt.jar.

You are all set! Just make sure you include:

import processing.opengl.*;

as well as

  size(200,200,OPENGL);

in your code.

A project example with all of this set up for you in in the Examples CVS.

Search
  Page last modified on November 01, 2009, at 12:11 AM