Login  Register

Re: Processing P3D, Raspberry Pi, OpenGL doesn't work

Posted by Xerxes Rånby on Jul 17, 2015; 1:45pm
URL: https://forum.jogamp.org/Processing-P3D-Raspberry-Pi-OpenGL-doesn-t-work-tp4034928p4034929.html

Hi Processing 2.x.x is built around the concept that all windows inherit a java applet surface and thus indirectly is using an AWT X11 Window surface.
The properitary Broadcom Raspbery Pi OpenGL ES driver is using a dispmanx surface for that is incompatible with AWT X11 Window surfaces.

JogAmp can initialize the Broadcom specifix dispmanx surface using the NEWT API.
Processing 3.x.x has removed all support for applets and thus switched from using AWT to NEWT for all P3D sketches!
This means that hardware acceleration with processing on the raspberry pi is possible when using Processing 3.

As a proof of concept


As you can see in this image NEWT uses the dispmanx api to provide a hardware accelerated window on top of the xorg window, NEWT also provide a "white" mousepointer.

The above image was generated by combining the latest jogl git + a patched version of processing to initialize a gl2es2 profile and removing some calls that cased runtime exceptions using the raspberry pi opengl es 2 driver.
https://github.com/xranby/processing/commits/arm-3.0-rebased


There exist one alternative by using the new free software Mesa3D vc4 OpenGL 2 driver you can get processing 3 running on the raspberry pi similar to a desktop system. The Mesa3D vc4 driver expects use of AWT X11 Windows thus it shall work with both Processing 2 and Processing 3.
http://labb.zafena.se/?p=972