This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| Description: | Code as Art, Art as Code. Processing and Ruby are meant for each other. edit |
Sort by:
Priority
Priority
|
Votes
Votes
|
Last Updated
Last Updated
Loading…
-
I'm on Ubuntu Jaunty with Sun Java 6 and Ruby 1.8
I get this exception when trying to use Opengl
java.lang.IllegalArgumentException: GLDrawableFactory.chooseGraphicsConfiguration() was not used when creating this Component
at com.sun.opengl.impl.x11.X11GLDrawableFactory.getGLDrawable(X11GLDrawableFactory.java:238) at processing.opengl.PGraphicsOpenGL.allocate(PGraphicsOpenGL.java:190) at processing.core.PGraphics3D.setSize(PGraphics3D.java:316) at processing.core.PApplet.makeGraphics(PApplet.java:1165) at processing.core.PApplet.size(PApplet.java:999) at processing.core.PApplet.size(PApplet.java:959) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:298) at org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:259) at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:67) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192) at org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:163) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:117) at org.jruby.RubyClass.finvoke(RubyClass.java:449) at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:401) at org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:230) at org.jruby.proxy.processing.core.PApplet$Proxy0.setup(Unknown Source) at processing.core.PApplet.handleDraw(PApplet.java:1400) at processing.core.PApplet.run(PApplet.java:1328) at java.lang.Thread.run(Thread.java:619)Exception in thread "Animation Thread" processing/core/PApplet.java:1212:in `makeGraphics': java.lang.RuntimeException: processing.opengl.PGraphicsOpenGL needs to be updated for the current release of Processing. (NativeException)
from processing/core/PApplet.java:999:in `size' from processing/core/PApplet.java:959:in `size' from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0' from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke' from sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke' from java/lang/reflect/Method.java:597:in `invoke' from org/jruby/javasupport/JavaMethod.java:298:in `invokeWithExceptionHandling' from org/jruby/javasupport/JavaMethod.java:259:in `invoke' ... 21 levels... from java/lang/Thread.java:619:in `run' from opengltest.rb:8:in `setup' from :1Complete Java stackTrace
java.lang.RuntimeException: processing.opengl.PGraphicsOpenGL needs to be updated for the current release of Processing.
at processing.core.PApplet.makeGraphics(PApplet.java:1212) at processing.core.PApplet.size(PApplet.java:999) at processing.core.PApplet.size(PApplet.java:959) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:298) at org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:259) at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:67) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192) at org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:163) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:117) at org.jruby.RubyClass.finvoke(RubyClass.java:449) at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:401) at org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:230) at org.jruby.proxy.processing.core.PApplet$Proxy0.setup(Unknown Source) at processing.core.PApplet.handleDraw(PApplet.java:1400) at processing.core.PApplet.run(PApplet.java:1328) at java.lang.Thread.run(Thread.java:619) ...internal jruby stack elided... from processing.core.PApplet.size(PApplet.java:999) from processing.core.PApplet.size(PApplet.java:959) from sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) from sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) from sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) from java.lang.reflect.Method.invoke(Method.java:597) from org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:298) from org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:259) from org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:67) from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313) from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:192) from org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40) from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) from org.jruby.ast.BlockNode.interpret(BlockNode.java:71) from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:163) from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144) from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:273) from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:112) from org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36) from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104) from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:101) from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113) from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:117) from org.jruby.RubyClass.finvoke(RubyClass.java:449) from org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:401) from org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:230) from org.jruby.proxy.processing.core.PApplet$Proxy0.setup(Unknown Source) from processing.core.PApplet.handleDraw(PApplet.java:1400) from processing.core.PApplet.run(PApplet.java:1328) from java.lang.Thread.run(Thread.java:619)Comments












Can you please paste or link to the code that you were using when this happened?
http://quakespotter.org/
Exception in thread "Animation Thread" processing/core/PApplet.java:1212:in `makeGraphics': java.lang.RuntimeException: processing.opengl.PGraphicsOpenGL needs to be updated for the current release of Processing. (NativeException)
Complete Java stackTrace
java.lang.RuntimeException: processing.opengl.PGraphicsOpenGL needs to be updated for the current release of Processing.
Hi jaskenas.
this code get same exception.
http://gist.github.com/172721
I'm having a hell of a time trying to fix this thing because I don't have access to a Linux box at the moment -- just a VM that doesn't support OpenGL. If any of you want to take a stab at it, the relevant code is in lib/ruby-processing/app.rb. Methods like determine_how_to_display, and display_full_screen are particularly relevant.
I've pushed a patch to master that may fix this -- but I'm unable to verify if it does. If one of you with a Linux box could do so, it would be greatly appreciated.
Cool, thanks; had forgotten about this. I'll give it a shot tomorrow.
I copied lib/core and library/opengl from jashkenas-ruby-processing-3b5c6f79fd4017433b8e2b9e959d87c70e4fee37 to my quakespotter clone and receive the same error: "processing.opengl.PGraphicsOpenGL needs to be updated for the current release of Processing"
As noted in http://gist.github.com/91256 if I change "size(750, 750, OPENGL)" to "size(750, 750, P3D)" Quakespotter seems to run fine.
Cheap hack:
--- a/Quakespotter.app/lib/quakespotter.rb +++ b/Quakespotter.app/lib/quakespotter.rb @@ -18,7 +18,7 @@ class WorldWide < Processing::App attr_reader :globe, :quakes, :selected, :status, :scraper, :controls, :overlay, :font
def setup - size(750, 750, OPENGL) + size(750, 750, OPENGL) rescue size(750, 750, P3D)
:-)
OPENGL used to be a big issue on linux, mainly because the distros that use scripts to install java used to create a software emulated OPENGL (which mostly never worked). For me this problem has gone away with recent jdk updates that support native OPENGL.
Thought I'd better make sure this problem wasn't a different issue, so I checked the kineticType example (which works with on java processing with OPENGL) but doesn't work on ruby-processing with or without new patch).
FlightPatterns works fine though...
NB: to make sure flight patterns did not default to P3D I replaces the P3D option with (puts "Panic") and panic was not called. So it is definetly not a simple opengl problem but something a bit subtler, for the non-working kinetic_type my error messages were as for Saji.
Hmm. I think that the only difference between the two is that Flight Patterns renders full screen. Perhaps try making Kinetic Type full screen and see what happens...
Just when I thought there may be a solution vis use fullscreen opengl exclusively (on linux) there is a fly in the ointment. Read the latest post over on the processing discourse http://processing.org/discourse/yabb2/YaBB.pl?num=1150213949 (bottom of page 4) fullscreen api is itself causing issues with opengl.
Hi Monkstone. I'm actually not using that same fullscreen hack that they've got in that thread. Our implementation is much simpler. I think your original solution is most of the way there -- OpenGL works on Linux when you don't ever change the screen size. We need to find a way to make the screen size pre-determined, or correctly teardown the OpenGL context when changing sizes.
Yes that seems to be the case!!!
Here is a hack that works to get the kinetic_type.rb opengl working on ruby.
if java.lang.System.get_property('os.name') == "Linux" then
KineticType.new :width => 200, :height => 200, :title => "Kinetic Type", :full_screen => true
else
KineticType.new :width => 200, :height => 200, :title => "Kinetic Type"
end
The following is the unformatted console output after running the app:-
org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,100x100,invalid,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,100x100,invalid,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,1280x1024,invalid,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,1280x1024,invalid,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,1280x1024,invalid,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,1280x1024,layout=java.awt.FlowLayout]org.jruby.proxy.processing.core.PApplet$Proxy0[panel0,0,0,1280x1024,layout=java.awt.FlowLayout]