Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0

Friday, 21 January 2011

Accelerating java2d sketches in ruby processing

Graphics acceleration of java2d is apparently turned off by default. To enable it add the following to java_args.txt in the data folder (of the sketch you wish to accelerate).

-Dsun.java2d.opengl=true  (use True instead for verbose output informs you that the graphics pipeline is open)
Which sketches will benefit from such acceleration could be determined empirically, although this article gives some guidance.  I was alerted to this information by one of phi.lho responses (on the processing discussion board) to a query about relative speed of some sketches on Windows and Ubuntu (which were different Ubuntu slower, until the use of this java option).

This article is only of interest if you've got a decent graphics card and are not using software emulated graphics acceleration (eg mesa on linux). Doesn't seem to play well with control panel sketches such as jwishy.


About Me

My photo
I have developed JRubyArt and propane new versions of ruby-processing for JRuby- and processing-3.2.2