Wikipedia had it wrong: the spec for the OpenGL ES Shading Language Version 1.00 defines the version preprocessor directive as "#version 100", and _not_ "#version 100 es", like version 3.00+ of the language wants it.
This made the Raspberry Pi with the legacy driver unhappy. Thanks @DangusTaargus for reporting.
see https://www.khronos.org/files/opengles_shading_language.pdf
If the file node is not accessible yet, NativeInterface.writeFile() will return -EACCES instead of -EPERM. Thanks @msurguy for reporting this and testing.
Fixes:
java.lang.RuntimeException: GL function glBlitFramebuffer() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
at processing.opengl.PJOGL.blitFramebuffer(PJOGL.java:1939)
at processing.opengl.PGL.syncBackTexture(PGL.java:595)
at processing.opengl.PGL.endRender(PGL.java:769)
at processing.opengl.PGraphicsOpenGL.endOnscreenDraw(PGraphicsOpenGL.java:6598)
at processing.opengl.PGraphicsOpenGL.endDraw(PGraphicsOpenGL.java:1483)
at processing.core.PApplet.handleDraw(PApplet.java:2444)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Fixes:
java.lang.RuntimeException: GL function glReadBuffer() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
at processing.opengl.PJOGL.readBuffer(PJOGL.java:1954)
at processing.opengl.PJOGL.initFBOLayerES(PJOGL.java:310)
at processing.opengl.PJOGL.initFBOLayer(PJOGL.java:301)
at processing.opengl.PGL.createFBOLayer(PGL.java:988)
at processing.opengl.PGL.beginRender(PGL.java:727)
at processing.opengl.PGraphicsOpenGL.beginOnscreenDraw(PGraphicsOpenGL.java:6576)
at processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1459)
at processing.core.PApplet.handleDraw(PApplet.java:2388)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Fixes:
java.lang.RuntimeException: GL function glRenderbufferStorageMultisample() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
at processing.opengl.PJOGL.renderbufferStorageMultisample(PJOGL.java:1941)
at processing.opengl.PGL.createFBOLayer(PGL.java:955)
at processing.opengl.PGL.beginRender(PGL.java:727)
at processing.opengl.PGraphicsOpenGL.beginOnscreenDraw(PGraphicsOpenGL.java:6577)
at processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1459)
at processing.core.PApplet.handleDraw(PApplet.java:2388)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Testing on the latest Raspbian release shows that the open-source Mesa driver can handle 4 lights on all P3D examples without tripping up during register allocation. Still an issue with 8 lights, so leave it at 4 for now, and re-test with 6 next time around.