diwi/PixelFlow

Using on Raspberry Pi (is it a dead end?)

JoakimSoderberg opened this issue · 0 comments

Hello,

I'm trying to run a processing sketch on a Raspberry Pi 3b, but I get this error:

glGetError 0x500
DwGLTexture.resize tex | GL_ERROR: invalid enumerant
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
glGetError 0x501
DwGLTexture.resize tex | GL_ERROR: invalid value
WARNING: DwGLFrameBuffer.bind(...) number of textures exceeds max limit: 1 > 0
com.jogamp.opengl.GLException: array offset argument "bufs_offset" (0) equals or exceeds array length (0)
        at jogamp.opengl.es3.GLES3Impl.glDrawBuffers(GLES3Impl.java:3212)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLFrameBuffer.bind(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLFrameBuffer.clearTexture(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture$TexturePingPong.clear(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.clearTextures(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.reset(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.resize(Unknown Source)
        at com.thomasdiewald.pixelflow.java.fluid.DwFluid2D.<init>(Unknown Source)
        at fluid.setup(fluid.java:144)
        at processing.core.PApplet.handleDraw(PApplet.java:2401)
        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)

This is using the Legacy OpenGL driver, not the "Fake KMS" or "Full KMS" one (those fail for other reasons).

Not sure if the above error is because Pixelflow/Java assumes it is using GLES3, but the RPi only supports GLES2. And that's the reason it fails?

at jogamp.opengl.es3.GLES3Impl.glDrawBuffers(GLES3Impl.java:3212)

The actual code where it gets the max_draw_buffers has an if statement to check if its GLES3 or not:

public void allocate(GL2ES2 gl){
if(!isFBO()){
this.gl = gl;
if(gl.isGL3()){
this.gl3 = gl.getGL3();
}
gl.glGenFramebuffers(1, HANDLE_fbo, 0);
int[] buf = new int[1];
// gl.glGetIntegerv(GL2.GL_MAX_COLOR_ATTACHMENTS, buf, 0);
// max_color_attachments = buf[0];
gl.glGetIntegerv(GL2.GL_MAX_DRAW_BUFFERS, buf, 0);
max_draw_buffers = buf[0];
// max_bind = Math.min(max_draw_buffers, max_color_attachments);
// max_bind = max_draw_buffers;
}
}

Anyway, I'm no OpenGL expert, so I don't know if there's no point in even running Pixelflow on a Raspberry Pi. Or if this is just some bug?