P2D and P3D on Raspi
in
Integration and Hardware
•
1 month ago
I've made several JAR-ed copies of different generative art projects in the hopes that I can loop them on a Raspi connected to a television screen. The JARs work just fine on my Windows and Mac machines, but when I try and get them to run on a Raspberry Pi I get an inscrutable stacktrace. I've read that setPixels and loadPixels have some issues on Raspi (maybe), but I've tried projects that just involve simple path drawing and PShapes. I'm including all of the packages from Processing 2.02 in the compile.
I'm spawning a default X server using the X command (or startx) over SSH with the HDMI out set as $DISPLAY. When I start the JAR up using either openJDK7 or the beta sun JDK8, X reacts, drawing a grey border and white box. After a delay, I get this stacktrace and the x window crashes (the same happens if I execute locally instead of over SSH):
glGetError 0x500
glGetError 0x500
Exception in thread "Animation Thread" java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1186)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:572)
at java.awt.Container.addImpl(Container.java:1114)
at java.awt.Container.add(Container.java:966)
at processing.opengl.PGL.initSurface(PGL.java:563)
at processing.opengl.PGL.initSurface(PGL.java:495)
at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:5941)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1604)
at processing.core.PApplet.run(PApplet.java:2141)
at java.lang.Thread.run(Thread.java:724)
It looks like there is something going wrong between NEWT and AWT, but I'm not too sure what is going on. Could it be something with the Broadcom graphics chip? Does anyone have any ideas I could try to get these projects to work? Should I try changing settings and building Processing from the source? Have I just, in my ignorance, configured X poorly?
I'm not super attached to the Raspi, I just need something powerful enough for large path drawing that can output to a television in HD, and that seemed to fit the bill. I'd welcome better hardware suggestions that would also sidestep this problem.
Thanks!
I'm spawning a default X server using the X command (or startx) over SSH with the HDMI out set as $DISPLAY. When I start the JAR up using either openJDK7 or the beta sun JDK8, X reacts, drawing a grey border and white box. After a delay, I get this stacktrace and the x window crashes (the same happens if I execute locally instead of over SSH):
glGetError 0x500
glGetError 0x500
Exception in thread "Animation Thread" java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1186)
at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:572)
at java.awt.Container.addImpl(Container.java:1114)
at java.awt.Container.add(Container.java:966)
at processing.opengl.PGL.initSurface(PGL.java:563)
at processing.opengl.PGL.initSurface(PGL.java:495)
at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:5941)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1604)
at processing.core.PApplet.run(PApplet.java:2141)
at java.lang.Thread.run(Thread.java:724)
It looks like there is something going wrong between NEWT and AWT, but I'm not too sure what is going on. Could it be something with the Broadcom graphics chip? Does anyone have any ideas I could try to get these projects to work? Should I try changing settings and building Processing from the source? Have I just, in my ignorance, configured X poorly?
I'm not super attached to the Raspi, I just need something powerful enough for large path drawing that can output to a television in HD, and that seemed to fit the bill. I'd welcome better hardware suggestions that would also sidestep this problem.
Thanks!
1