Recently I've been looking at Povray, pyprocessing, and cfdg (version 3.0) as tools for creating digital images. I have branched two separate blogs where I mainly explore jruby + processing and processing.py

Friday, 29 July 2011

NetBeans For Processing (including opengl)

Using Native Libraries for Processing in Netbeans

To use processing in netbeans you should "create a processing library" this is described here:-

http://shinkirou.org/blog/2010/08/using-processing-in-netbeans/.

To use opengl in processing you should also create a opengl library, and add that to your project:-
Since processing-2.0 P3D is opengl, so it makes sense to include those files as well, and since 2.0a5 make sure to include the jar containing the native binaries for your system (Linux/Mac/Windows , also you no longer need the -Djava.lib.path to be passed at runtime).



To create the ProcessingOpenGL library you need the path to the opengl libraries and jogl src:-


/home/sid/processing-1.5.1/modes/java/libraries/opengl/library/opengl.jar
/home/sid/processing-1.5.1/modes/java/libraries/opengl/library/gluegen-rt.jar
/home/sid/processing-1.5.1/modes/java/libraries/opengl/library/jogl.jar


/home/sid/processing-1.5.1/modes/java/libraries/opengl/library/jogl-src.zip

If you want to run the applet from net beans you will need access the native libraries, to do this set the project properties as follows:-



VM Options: -Djava.library.path=/home/sid/processing-1.5.1/java/libraries/opengl/library/linux64

Obviously adjust the above paths to suit your environment, be it 32 bit linux/windows etc.

Update 26 February, with a bit of luck the processing developers will return to placing the native binaries in a jar, and the previous step will be unecessary (you will just have to put that jar on your path as for gluegen/jogl etc).  That's what seems to be happening recently anyway. For an update follow link http://martinpblogformasswritingproject.blogspot.co.uk/2012/07/setting-up-netbeans-72-for-processing-20.html

No comments:

Post a Comment

Followers

Blog Archive

About Me

My photo
Pembrokeshire, United Kingdom
I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2