We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpProcessing Implementations › Ruby-Processing 1.0.2 OpenGL misery
Page Index Toggle Pages: 1
Ruby-Processing 1.0.2 OpenGL misery (Read 2971 times)
Ruby-Processing 1.0.2 OpenGL misery
Jan 29th, 2009, 12:30am
 
Hello, below is a really basic sketch I was trying to get going just to test out OpenGL in Ruby-Processing.

Code:
require 'ruby-processing'

class Opengltest < Processing::App
load_java_library "opengl"
include_package "processing.opengl"

def setup
render_mode OPENGL
end

def draw

end

end

Opengltest.new :title => "Opengltest", :width => 800, :height => 600



However, when the sketch runs. I get the error trace below:

Exception in thread "Animation Thread" java/lang/Class.java:-2:in `getDeclaredConstructors0': java.lang.VerifyError: (class: processing/opengl/PGraphicsOpenGL, method: bindTexture signature: (Lprocessing/core/PImage;)V) Bad access to protected data (NativeException)
from java/lang/Class.java:2357:in `privateGetDeclaredConstructors'
from java/lang/Class.java:2671:in `getConstructor0'
from java/lang/Class.java:1629:in `getConstructor'
from processing/core/PApplet.java:1142:in `makeGraphics'
from processing/core/PApplet.java:982:in `size'
from processing/core/PApplet.java:942:in `size'
from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
... 26 levels...
from java/lang/Thread.java:613:in `run'
from opengltest.rb:8:in `setup'
from :1

Re: Ruby-Processing 1.0.2 OpenGL misery
Reply #1 - Jan 31st, 2009, 5:06pm
 
Hi datalus.

That basic sketch works just fine for me. (although it doesn't do anything particularly impressive). Perhaps this is a java version problem? What's the version number of your Java install, and what platform are you running it on? Are you using Ruby-Processing 1.0.2?
Re: Ruby-Processing 1.0.2 OpenGL misery
Reply #2 - Feb 4th, 2009, 5:24pm
 
jashkenas wrote on Jan 31st, 2009, 5:06pm:
Hi datalus.

That basic sketch works just fine for me. (although it doesn't do anything particularly impressive). Perhaps this is a java version problem What's the version number of your Java install, and what platform are you running it on Are you using Ruby-Processing 1.0.2


Hey jashkenas, thanks for responding.

I am on Mac OS X 10.5.5 and I believe it's just using the Java install that came with the OS, I haven't particularly modified it at all. And I am using Processing 1.0.2.

Here's what I get out of java -version at the CLI:

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Re: Ruby-Processing 1.0.2 OpenGL misery
Reply #3 - Feb 5th, 2009, 5:17am
 
Hmm. That's *exactly* the same setup that I have, down to the Java build. Your error looks like a problem somewhere in the C part of the OpenGL library. That suggests that it's not something going wrong with the Ruby-Processing code directly. Can you run other programs that use JOGL? What happens when you try samples/full_screen.rb?
Re: Ruby-Processing 1.0.2 OpenGL misery
Reply #4 - Feb 6th, 2009, 10:59pm
 
Fixed it. Thanks a lot for your help.

I am a complete idiot. Haha. My path to the JOGL lib folder was wrong. Thanks again Smiley
Re: Ruby-Processing 1.0.2 OpenGL misery
Reply #5 - Feb 6th, 2009, 11:04pm
 
I had this problem as well, but it was fixed for me when I removed the opengl folder from the library folder.

/sketch/
/sketch/library/
/sketch/library/boids/
/sketch/library/minim/
/sketch/library/opengl/ -- (removed this to make it work)
/sketch/library/osc/
/sketch/mysketch.rb
Page Index Toggle Pages: 1