moumar (owner)

Revisions

gist: 91256 Download_button fork
public
Description:
ruby-processing opengl bug on linux
Public Clone URL: git://gist.github.com/91256.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
require "ruby-processing"
 
class BugOpengl < Processing::App
  load_library 'opengl'
  import "processing.opengl"
 
  def setup
    render_mode OPENGL
    #render_mode P3D
    smooth
  end
 
  def draw
    lights
    background(200)
    fill(100)
    translate(width/2, height/2)
    rotate_x(1)
    rotate_y(1)
    box(150)
  end
end
 
BugOpengl.new(:width => 640, :height => 480)
 
__END__
 
with 'render_mode P3D' everything is ok
with 'render_mode OPENGL' i got the following error
 
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 bug_opengl.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)