jashkenas / ruby-processing

Code as Art, Art as Code. Processing and Ruby are meant for each other.
http://github.com/jashkenas/ruby-processing/wikis
Other
1.28k stars 94 forks source link

Exception on Opengl rendering. #7

Closed Saji closed 12 years ago

Saji commented 15 years ago

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:insize' from processing/core/PApplet.java:959:in size' from sun/reflect/NativeMethodAccessorImpl.java:-2:ininvoke0' from sun/reflect/NativeMethodAccessorImpl.java:39:in invoke' from sun/reflect/DelegatingMethodAccessorImpl.java:25:ininvoke' from java/lang/reflect/Method.java:597:in invoke' from org/jruby/javasupport/JavaMethod.java:298:ininvokeWithExceptionHandling' from org/jruby/javasupport/JavaMethod.java:259:in invoke' ... 21 levels... from java/lang/Thread.java:619:inrun' from opengltest.rb:8:in `setup' from :1 Complete 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)

jashkenas commented 15 years ago

Can you please paste or link to the code that you were using when this happened?

ghost commented 15 years ago

http://quakespotter.org/

uname -a Linux linux116.ctc.com 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux java -version java version "1.6.0_0" IcedTea6 1.3.1 (6b12-Fedora-EPEL-5) Runtime Environment (build 1.6.0_0-b12) OpenJDK Server VM (build 1.6.0_0-b12, mixed mode) ./quakespotter 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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:302) at org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:263) at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:72) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:197) 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:112) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:124) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:130) at org.jruby.RubyClass.finvoke(RubyClass.java:511) at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:419) 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:636)

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:insize' from processing/core/PApplet.java:959:in size' from sun/reflect/NativeMethodAccessorImpl.java:-2:ininvoke0' from sun/reflect/NativeMethodAccessorImpl.java:57:in invoke' from sun/reflect/DelegatingMethodAccessorImpl.java:43:ininvoke' from java/lang/reflect/Method.java:616:in invoke' from org/jruby/javasupport/JavaMethod.java:302:ininvokeWithExceptionHandling' from org/jruby/javasupport/JavaMethod.java:263:in invoke' ... 14 levels... from processing/core/PApplet.java:1328:inrun' from java/lang/Thread.java:636:in `run' from :1

Complete 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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:302) at org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:263) at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:72) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:197) 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:112) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:124) at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:130) at org.jruby.RubyClass.finvoke(RubyClass.java:511) at org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:419) 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:636) ...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:57) from sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) from java.lang.reflect.Method.invoke(Method.java:616) from org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:302) from org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:263) from org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:72) from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318) from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:197) 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:112) from org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:124) from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:130) from org.jruby.RubyClass.finvoke(RubyClass.java:511) from org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:419) 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:636)

k1LoW commented 15 years ago

Hi jaskenas.

this code get same exception. http://gist.github.com/172721

jashkenas commented 15 years ago

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.

jashkenas commented 15 years ago

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.

ghost commented 15 years ago

Cool, thanks; had forgotten about this. I'll give it a shot tomorrow.

ghost commented 15 years ago

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.

ghost commented 15 years ago

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

monkstone commented 15 years ago

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.

monkstone commented 15 years ago

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...

monkstone commented 15 years ago

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.

jashkenas commented 15 years ago

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...

monkstone commented 15 years ago

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.

jashkenas commented 15 years ago

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.

monkstone commented 15 years ago

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]

sklemm commented 14 years ago

any news?

monkstone commented 14 years ago

I've been experimenting with the latest jruby-1.5.2 (probably not the problem) and the latest processing 091 core.jar and if my experience is correct there could be more problems to come for linux users (I couldn't even get full_screen to work with opengl or even p3d). Anyway that's not a current issue. I would like to report that if you are mad like me and have upgraded to a 64 bit system then the native binaries will not work for you. This is the error report to expect:-

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,100x100,invalid,layout=java.awt.FlowLayout]Exception in thread "Animation Thread" java/lang/ClassLoader.java:-2:in load': java.lang.UnsatisfiedLinkError: /var/lib/gems/1.9.1/gems/ruby-processing-1.0.9/library/opengl/library/libgluegen-rt.so: /var/lib/gems/1.9.1/gems/ruby-processing-1.0.9/library/opengl/library/libgluegen-rt.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) (NativeException) from java/lang/ClassLoader.java:1803:inloadLibrary0' from java/lang/ClassLoader.java:1728:in loadLibrary' from java/lang/Runtime.java:823:inloadLibrary0' from java/lang/System.java:1028:in loadLibrary' from com/sun/gluegen/runtime/NativeLibLoader.java:102:inloadLibraryInternal' from com/sun/gluegen/runtime/NativeLibLoader.java:51:in access$000' from com/sun/gluegen/runtime/NativeLibLoader.java:70:inrun' from java/security/AccessController.java:-2:in doPrivileged' ... 17 levels... from l_system.rb:84:insetup_opengl' from l_system.rb:13:in `setup' from :1 ...internal jruby stack elided... from java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803) from java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728) from java.lang.Runtime.loadLibrary0(Runtime.java:823) from java.lang.System.loadLibrary(System.java:1028) from com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102) from com.sun.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51) from com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70) from java.security.AccessController.doPrivileged(Native Method) from com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68) from com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:399) from com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:163) from com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129) from com.sun.opengl.impl.x11.DRIHack.begin(DRIHack.java:109) from com.sun.opengl.impl.x11.X11GLDrawableFactory.(X11GLDrawableFactory.java:99) from java.lang.Class.forName0(Native Method) from java.lang.Class.forName(Class.java:169) from javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111) from processing.opengl.PGraphicsOpenGL.allocate(PGraphicsOpenGL.java:172) from processing.core.PGraphics3D.setSize(PGraphics3D.java:316) from processing.core.PApplet.makeGraphics(PApplet.java:1165) from processing.core.PApplet.size(PApplet.java:999) from org.jruby.proxy.processing.core.PApplet$Proxy0.__super$size(Unknown Source)

fortunately there is a solution which I have been using successfully for some time you just need to install the correct native binaries. There is an article on the old processing discourse board http://processing.org/discourse/yabb2/YaBB.pl?num=1271143980/3 by Larry Kyrala who has created a ruby script to extract the vanilla processing binaries which is what I have been doing, and copy over the extracted *.so files to the ruby-processing opengl library. I have now adapted the script to work directly on the ruby-processing library, follow the link to my blog.

monkstone commented 13 years ago

Everything appears to be fixed with the latest ruby-processing 1.0.10 version, interestingly I can get opengl sketches to run quite decently on Aptosid with nouveau drivers and the latest libgl1-mesa-dri-experimental to provide the 3D acceleration. However if you want to experiment with shaders etc, the proprietary drivers (eg NVIDIA) are probably required.