zafena development

July 10, 2015

Processing 3 is running for the first time on a Raspberry Pi using Eric Anholt’s Mesa3D VC4 driver!

Video of the Processing 3 RGB cube demo running on the Raspberry Pi using Eric Anholt’s Mesa3D VC4 OpenGL 2 driver:

Thanks to the free software Mesa3d vc4 driver, the raspberry pi suddenly turned from a mobile opengl es 2 system into a “desktop” opengl 2 system.

Processing 3 is using JogAmp JOGL to tap into OpenGL hardware acceleration on the armv6 Raspberry Pi 1 and armv7 RaspberryPi 2 systems.

Hold on what is going on here, how can I setup the free software vc4 driver on my Raspberry Pi system?

This is a collaboration with Eric Anholt, anholt, and Gottfried Haider, gohai, to get Processing 3 running on the Raspberry Pi.

Eric Anholt has worked about a year to implement a full OpenGL 2 Mesa3D driver for use on the Raspberry Pi by using the Video Core 4, VC4, GPU.

Getting Eric Anholt’s Mesa3D VC4 driver running on a Raspberry Pi is easily done thanks to the work by gohai.
gohai started out roughly following Eric’s notes here:
And then put together a buildbot in Python, to produce system images for use on the Pi or Pi2.

Kernel, Mesa, XServer packages & dependencies are from git. System image produced using gohai’s buildbot

gohai publish daily builds using his bot at:

Myself I have contributed to fix corner-cases in JogAmp JOGL OpenGL initialization to get it all running.

What was the problem using the proprietary OpenGL ES vc4 driver on the Raspberry Pi system?

The OpenGL ES standard do not cover how the native window is initialized.
When you initialize opengl es then you must pass a platform specific EGLNativeWindowType, EGLNativePixmapType and EGLNativeDisplayType depending on the OS you use.

If you read the Khronos header for eglplatform.h you will notice that the EGLNativeWindowType is different for
Windows: typedef HWND EGLNativeWindowType;
Mac: typedef void *EGLNativeWindowType;
Android: typedef struct ANativeWindow* EGLNativeWindowType;
Unix X11: typedef Window EGLNativeWindowType;

Creating an on-screen EGL rendering surface requires you to to use the eglCreateWindowSurface function, which takes a EGLNativeWindowType parameter. On the Raspberry Pi, however this is implemented as a EGL_DISPMANX_WINDOW_T struct, which is defined in eglplatform.h as:

typedef struct {
int width; /* This is necessary because dispmanx elements are not queriable. */
int height;

As you can see RaspberryPi using the properitary binary drivers uses a Broadcom unique native window type that is incompatible with X11.
This is the reason why we cant use the Processing code as is to pass a Java AWT Unix X11 Window to initialize OpenGL ES, EGL will return an error that you have passed an incompatible structure to eglCreateWindowSurface.

When using Eric Anholt’s Mesa3D vc4 driver then EGL will expect a Unix X11 Window for its EGLNativeWindowType and this is why processing will work out of the box when Erics Mesa3D vc4 driver in use. Eric’s vc4 driver also implements OpenGL 2 that can be initialized using GLX. GLX allows you to run Processing with OpenGL acceleration across remote X11 network connections!

Xerxes Rånby

February 1, 2014

The JogAmp community held a Ji Gong freedom talk that reminded people to exercise the 4 freedoms granted by the free software licenses in front of the free java developer room audience. The talk also proposed and showcased technical enhancements for High Availability JVM Technology on All Platforms.
Slides from the Ji Gong talk can be obtained at:

During the same week JogAmp released version 2.1.4 of its high performance java opengl audio & media processing librarys.
This release includes some new highlights:
* Android OpenCL test apk’s. This enable you to compile and test an OpenCL JOCL application on desktop and then deploy on Android without using any OpenCL SDK for the phone, the JOCL binding will locate and bind the OpenCL drivers at runtime.
* Enable use of custom mouse pointers and window icons using the NEWT window and input toolkit.
* Multi window support on the Raspberry Pi including mouse-pointer use directly from console!
Complete list of bugs resolved for this 2.1.4 release can be found at:

August 6, 2013

Ji Gong project announcement

August 4, 2013

JogAmp Ji Gong project announcement

“Ji Gong shall enable the VM technology across platform and devices.”

Sven Gothel Aug 04, 2013; 9:45am ”
Bug 790 <>
Bug 698 <>


Current Ji Gong Dependency
including the OpenJDK API subset, etc:


1st Milestone – Core JRT for all platforms ..


Calling for volunteers.

We are looking for sponsors!




OpenJDK and its chair decided not to go mobile?

Bug 698 was written due to the “Fear, uncertainty and doubt” (FUD)
strategy of Oracle of not giving express permission to use OpenJDK
in compliance w/ the 4 freedoms of software (FSF definition).

On the contrary, Oracle gives a patent grant for using OpenJDK for desktop only,
implying mobile use may be prohibited.

This implication is highly likely non-sense, especially in the light of
the latest Oracle vs Google case where Oracle was not able to
substantiate a patent infringement by Google’s Dalvik VM.

However .. the current situation lacks of:
OpenJDK builds for Windows, OSX, Android, ..
IcedTea-Web builds for Windows, OSX, Android, ..

As Xerxes put it: The horse is bound to a chair and is not running ..

Project Name

Ji Gong <>
“Unlike a traditional Buddhist monk, Daoji did not like following traditional monastic codes. Daoji had a penchant for openly eating meat and drinking wine; his robes were often tattered and dirty from travelling from place to place, and stumbling while intoxicated. However, Daoji was kind hearted and was always ready to lend a helping hand to ordinary people. He would often treat the sick and fight against injustice. The monks, bewildered and fed up with his behavior, expelled Daoji from the monastery. From then on, Daoji roamed the streets and helped people whenever he could.”

Hence Daoji does people good while not necessarily conforming to certain arbitrary rules,
while maintaining sanity and being kind hearted.

The character is quite popular in the Asian culture.

Project Spirit


This project shall match the kind direction of it’s name giving character,
while also serving w/ JogAmp’s goals of being a technology enabler.

Ji Gong shall enable the VM technology across platform and devices.

This project must not necessarily being maintained by the JogAmp community.
On the contrary .. we would prefer this effort to be done from the original authors,
i.e. OpenJDK and IcedTea-Web.

However, until the goals below and this spirit of a free solution is being picked
up, we may continue pushing it forward from here.

Note: Bug 698 sadly wasn’t being replied to by neither Oracle nor the OpenJDK team.
Of course, no surprise here, since for Oracle it might be a conflict of interest
due to their ‘goals’ to market their ARM hotspot proprietary solution
and the OpenJDK team consist mainly of Oracle and RedHat members.
The latter focuses on server solutions and is highly cooperating w/ Oracle.

Project Goal


– Availability of the GPLv2 based OpenJDK runtime environment (JRT/JVM)
– Desktop (Linux, Windows, OSX, ..)
– Mobile (Android, other phones and tablet OS [maybe even iOS])
– VM CPU support:
– Intel/AMD 32bit and 64bit
– ARM based CPUs [Hotspot client/server n/a at time of writing. May need to use JamVM or AvianVM, ..]

– Optional AWT/Swing/etc – maybe added at a later time

– Web Plugin based on IcedTea-Web (JWeb)
– Capable to run w/o AWT using a pluggable windowing subsystem implementation
– Optional AWT/Swing/etc – maybe added at a later time

” Quoted from:

JogAmp forum: Project: Ji Gong

JogAmp JOGL, JOCL & JOAL provide cross platform Java™ language bindings to the OpenGL®, OpenCL™, OpenAL and OpenMAX APIs. JogAmp is a convenient enabler to give Desktop and Mobile applications access to hardware DSP & GPU units using a modular cross platform API.

Release announcement for JogAmp 2.0.2

This JogAmp JOGL version 2.0.2 release marks the end of the first major JogAmp release cycle that started with the v2.0-rc1 around two and a half years ago, “End of RCs ..“. JogAmp JOGL is a modern successor to the no longer maintained JOGL 1.1.1a. The 2.0.2 release added support for OpenGL versions up to 4.3, and OpenGL ES versions 1, 2, and 3.

Get in touch if you want to setup your own local JogAmp JOGL, JOAL and GlueGen source-code 10 year anniversary party. The JogAmp team is ready and here to save you!

The JogAmp team hosted one, awesome, party at the JogAmp BOF @ Siggraph 2013!

This years SIGGRAPH JogAmp BOF was dedicated to all the many amazing projects using JogAmp. We did try our best to demo as many projects as possible that we where able to fit into our session. One dude (MIT researcher) put it well, it was like “drinking from a fire-hose”; enjoy the demo flood!
Kudos to Qun who recorded the show! Here is a convenient time line to the many sections and topics covered during the talk:

00:02:00 Welcome to the JogAmp BOF
JogAmp Fast Media & Processing Across devices – Desktop & Mobile SIGGRAPH 2013 – Anaheim July 24, 2013
Presented by: Alan Sambol, Harvey Harrison, Rami Santina, Sven Gothel, Wade Walker, Xerxes Ranby, Dominik Ströhlein, Erik Brayet, Jens Hohmuth, Julien Gouesse, Mark Raynsford & Qun
00:02:46 10 Years
2003-06-06 to 2013-07-17


00:04:15 GLG2D
GLG2D OpenGL accelerated Graphics2D
GLG2D is a Graphics2D implementation that uses OpenGL to implement basic Java2D drawing functionality.”
00:05:07 Java3D
“I’m not Dead!” Java3D is back! Demo of: Vzome, SweetHome3d &
00:10:40 Jake2
Port of id Software’s Quake II to Java by bytonic software.
JOGL enables Jake2 to run on mobile ES2 and desktop GL2. Demo: NApplet


00:12:51 libGDX

Desktop/Android/iOS/HTML5 Java game development framework” The JogAmp JOGL libgdx backend add support to libGDX for, Raspberry Pi, desktop and mobile using one single libgdx backend. The JOGL backend, a team effort of the JogAmp community
00:16:46 jMonkeyEngine
Modern Java 3D” Currently Julien Gouesse develops a JOGL backend for jME3 with support of the jME team
00:17:40 Catequesis

Catequesis is a survival horror game based on 90’s RPGs gameplay, with a really strong and immersive story & a 8 bit graphic style. This game will be released for Android, PC, Mac & Linux.” Monsieur Max is documenting the technology behind the Catequesis game at his tech inside blog.
00:18:55 Ticket to Ride

DoW’s classic game designed by: Alan R. Moon now available on google play and steam; during the BOF we also showcased the game running on GNU/Linux.

– UI –

00:20:54 nifty-gui
Demonstration of Nifty Gui running unmodified on both desktop OpenGL and mobile OpenGL ES using the new JOGL GL2ES2 port
00:25:29 Graph API
Graph is a JogAmp JOGL implementation of Rami Santinas GPU based Resolution Independent Curve Rendering
00:26:58 MyHMI

MyHMI is a Java based object oriented software framework for industrial graphical user interfaces development.

– Art / Science –

00:34:49 Kohlenstoffeinheiten
The winning 4k demo from Revision 2013 made by Akronyme Analogiker / DemoscenePassivist
00:36:39 jSpatial
The jspatial package implements a set of spatial data structures.
00:37:50 GeoGebra
Dynamic mathematics & science for learning and teaching
00:41:03 jReality
jReality: a Java library for real-time interactive 3D graphics and audio
jReality is a Java based, open-source, full-featured 3D scene graph package designed for 3D visualization and specialized in mathematical visualization.”
00:42:23 BioJava
The goal of the BioJava project is to facilitate rapid application development for bioinformatics.
00:43:28 WorldWind
NASA World Wind SDK for Java. With this, developers can embed World Wind technology in their own applications.
00:44:51 Processing
Processing 2.0 PShader tutorial:
00:47:32 JaamSim includes a Collada loader
00:51:05 C3D
C3D Studio – Visual 5D Framework
C3D Studio is a 3D based visual framework for developing visual project control solutions for construction projects.” Slides:

– JogAmp –

00:57:09 JOCL

00:58:48 JOAL

01:01:27 GLMediaPlayer

01:03:50 JOGL / GLProfiles

01:05:18 JOGL / NEWT

01:08:55 JogAmp Platform Agnostic

01:09:55 JogAmp Deployment / Maven

– Finale –

01:10:48 Thank You / Q & A

01:19:46 End Sequence

Slides from the BOF is available at the site:

Thank you all for taking part into the realisation and use of JogAmp, the platform independent API, for GPU and DSP access across devices!

Cheers and have a great day!

June 27, 2013

JogAmp is the home of high performance Java™ libraries for 3D Graphics, Multimedia and Processing.
JOGL, JOCL and JOAL provide cross platform Java™ language bindings to the OpenGL®, OpenCL™, OpenAL and OpenMAX APIs.
Running on Android, Linux, Window, OSX, and Solaris across devices using Java.

Release announcement for JogAmp 2.0.2-rc12

“You’re encouraged to stop using the now-ancient 2.0-rc11!”

This 2.0.2-rc12 release include the largest security review in the 10-year history of JOGL

  • Security Fixes
    • Dynamic Linker Usage / Impl.
    • ProcAddressTable field visibility
    • Perform SecurityManager checks where required
    • Validation of property access
    • JAR Manifest tags:
      • Codebase
      • Permissions
      • Sealed
    • Use latest Java7 toolchain
      • Generating Java 1.6 bytecode
      • HTML API doc
Security fixes are marked in red on the above bug tracking page.
JogAmp send out thanks to the FuzzMyApp security researchers for healthy communication that triggered the security review work.

If you find an issue with the release, please report it to our bug database under the appropriate component. Development discussion takes place inside the JogAmp forum & mailing-list and the #jogamp IRC channel on

Meet us @

JogAmp @ SIGGRAPH 2013

February 14, 2013

OpenGL ES 2 drivers

Excellent post by cnx-software listing all the reverse engineering effort put into bringing opensource ARM GPU drivers to GNU/Linux.
The post links and embeds libv’s excellent FOSDEM 2013 reverse engineering ARM GPU driver talk.
The lima and freedreno reverse engineered drivers are both now known to be able to run Quake 3. The lima driver is now actually faster than the closed source ARM Mali driver! ARM!
We are not going away, we are here to stay. We cannot be silenced or stopped anymore, and we are becoming harder and harder to ignore.

It is only a matter of time before we produce an open source graphics driver stack which rivals your binary in performance. And that time is measured in weeks and months now. The requests from your own customers, for support for this open source stack, will only grow louder and louder.

So please, stop fighting us. Embrace us. Work with us. Your customers and shareholders will love you for it.

— libv.

OpenGL ES 3 drivers

Intel have taking the lead and released all their OpenGL ES 3 driver code into Mesa – this is how you should work, kudos to Intel.

OpenCL ARM GPU drivers

Android have for a long time refused vendors to ship ARM OpenCL drivers on Google approved Android devices. – Android lead Declined Support for OpenCL
Over night everything changed:
Google ships secret #ARM #MALI T-604 #OpenCL driver in Nexus 10 to accelerate Renderscript.
The OpenCL SDK for ARM Mali is now available! #opencl #gpu @ARMMultimedia
OpenCL drivers for Samsung Exynos 5 board landed here:
Also the Zii labs ZMS line supports CL
Amazon android line is rumored to support CL as well…

So with all these new news surfacing it looks like ARM devices running the new T-604 MALI GPU will have OpenCL drivers especially the Google Nexus 10 tablet that is reported to include the drivers in the stock install!
So this means we now have a good way to hardware accelerate FFT on ARM using OpenCL!
I want to use #OpenCL on #ARM to do fast live music #FFT analysis for better jazz music on the go

JogAmp update

JogAmp have implemented OpenCL bindings on GNU/LInux and packaged .apk for Android feel free to jump in and help with testing on real devices!
The current priority list for JogAmp OpenCL and OpenGL ES 3 integration is found inside the forum:

Cheers and have a great twitter valentine tweet day!
v3 is the new <3

February 8, 2013

This post is about an solution to an old chest nut that still plague ARM Java users on both servers, desktop and mobile. The problem it the impossibility to query the JVM system properties to find out the ABI armel/armhf in use, on ARM systems and possible other ARCH ABI variants as well such as x32, because no information about the ABI is exposed using said system properties. It is mandatory for developers to know the ABI in use at runtime in order to load matching JNI libraries.

About one year ago in 2012 the question got raised inside the #OpenJDK IRC channel but nothing really happened.
Later in 2012 the same question got raised inside the Raspberry Pi community during the move to the new Rasbian armhf system, but nothing really happened except adding more or less creative workarounds to all ARM Java applications and libraries.

The Raspberry Pi community eventually added a Java specific forum and now Oracle engaged in the community and asked for questions: So the question got raised again.
In the end of 2012 Oracle launched their first armhf JVM for the Raspberry Pi but the os.arch namespace was still not fixed, after reporting a workaround for the new JDK 8 EA Oracle took notice.
In the beginning of Jan 2013 Oracle Bob Vandette started an discussion on how to introduce an extended properties namespace that would cover the ABI differences to let applications discover the ABI at runtime.

During the FOSDEM 2013 JogAmp re-raised the question in front of the Oracle audience at 19m23s into the JogAmp talk and the response was “We just discussed that last week”. So our reply is “So we can not wait for that”. This issue is still causing hairpulling for ARM Java server/desktop/mobile deployments where for example the JVM tries to load armel JNI on the new armhf ARM Linux systems because the system properties set by the new armhf JVM is identical to an armel JVM, loading a library of the wrong ABI do not work.

Q: So what can we do about it?
A: Include an #freejava ELF header parser of course!

#JogAmp #gluegen now implements and use the following ELF header parser:;a=commit;h=371e1dbff6f5f255ab27ed0ab32368abb06eed82 … in order to find out the ABI at runtime without relying on if proper #JVM os.arch & ABI properties are set or not.

Kudos to Sven Gothel for implementing the new ELF header parser using the Gluegen StructAccessor.
Kudos to Andrew Haley, aph, who hatched the idea inside the #OpenJDK IRC channel to scan /proc/self/exe using an elf header parser from within the Java process itself and look for the Tag_ABI_VFP_args ELF header flag, this is what the implemented gluegen solution is based on.

February 6, 2013

I have just returned from FOSDEM where we Julen Gouesse, Sven Gothel and Xerxes Rånby presented a JogAmp freejava love talk with some live demonstrations running hardware accelerated on x86 laptop, android/meego phone/tables and GNU/LInux systems such as the AC100 and RaspberryPi.
Slides, Video and Teaser from the JogAmp FOSDEM freejava love talk are now online:

If you want to design a game then we recommend you to use JogAmp indirect through a game engine library such as libgdx or JMonkeyEngine 3. We have a forum thread inside the JogAmp community where we work on improving engine support for embedded devices such as the Raspberry Pi using said engines. By using a game engine will get you up to speed developing professional games that can be run across all devices and formfactors.
The video and teaser recordings also includes footage of the JMonkeyEngine 3 JOGL 2 backend initialized by Julien Gouesse that we for time reason never managed to show during the strict 40min talk and live demo at FOSDEM.

Inside the FOSDEM talk we ran the open-source libgdx game pax-britannica using the new libgdx JogAmp JOGL 2 port initialized by Julien Gouesse in combination with the new hardfloat fixed CACAO ARM JVM found in the new IcedTea 6 1.12 release on the Raspberry Pi.
we also ran the JogAmp Jake2 port, a port done by Sven Gothel, using the armhf JamVM from IcedTea 7 on the ac100.
Both opensource games of course rocked running using freejava!
The point that we wanted to show is that if you start to use the dedicated love using the media accelerator found in all new devices your java applications rendering will run *equally* fast regardless of the JVM implementation, since the rendering is then performed by the GPU instead of the CPU.

For demonstation purposes: I had to extend the libgdx backend with a custom mouse pointer in order for otherwise touchscreen oriented games such as pax-britannica to work on the Raspberry Pi from console, the reason why this is needed is because there is no highlevel compositing windowmanager running on the RaspPi adding the overlay mousepointer for you like what you are custom to see when running desktop applications using X11. This libgdx RaspberryPi mouse pointer branch allowed me to test all touch oriented libgdx games and demos from console using a mouse input device.

While we know that compilation of custom JVM can be tricky I have prepared a RaspberryPi armhf CACAO that you can use as an drop in replacement into any OpenJDK 6 installation (/usr/lib/jvm/java-6-openjdk-armhf/jre/lib/arm/server/ This was built using the IcedTea 6 1.12 release from inside a Raspbian chroot.
For JamVM simply install the openjdk-7-jdk package and run it using java -jamvm its already built and packaged by the Raspbian team and work great! The new CACAO armhf is found here:

The Raspberry Pi Rasbian armhf distribution have now packaged IcedTea 6 1.12.1 and included it in the distribution, this means that you can test the new armhf CACAO JVM and JamVM JVM by simply installing the openjdk-6-jdk package.

sudo apt-get update
sudo apt-get install openjdk-6-jdk
java -jamvm -version
java -cacao -version

Also a great KUDOS for Qun, our dear camera-woman!

Cheers and enjoy the love!
On behalf of the JogAmp community – Xerxes

November 11, 2012

2008: Sun Microsystems invested heavily into using hardware acceleration on mobile devices using JOGL. This was the foundation to get JavaFX 1.3 running across devices. Video of James Gosling, Ken Russell and Sven Gothel on stage at JavaOne 2008 keynote
Ken Russel later wrote his last Sun blog-post that covers the technology demonstrated in this first OpenGL ES 2 JOGL demonstration:
Later during the same year Sven Gothel demonstrated hardware accelerated OpenMAX video decoding on the same Tegra 1 mobile device using the new re-architectured JOGL 2 with stellar mobile support:

2009: The core members of the JOGL and Java3D team left Sun before Oracle took over and forked JOGL.,21516.0.html

2010: The JogAmp community was created.

2011: Oracle Gives up on Java3D (and JOGL) for RIA (Webstart and Applets)
The Oracle decision to remove all signed Java3D and JOGL builds from their servers, and hence break all existing online Java3D/JOGL applications using the SUN/Oracle builds, this have only been mentioned by Oracle inside the support forum.
Fortunately JOGL and Java3D was originally released under a BSD license so it was possible for the community to keep-on maintaining the bindings and provide JogAmp signed builds.

2012: Oracle work on flushing out its own use of JOGL in JavaFX by removing jogl-prism. Oracle no longer give programmers direct access to OpenGL using their APIs.
Oracle announced during JavaOne 2012 that Oracle would like to get help from the community to port JavaFX to new platforms under the OpenJFX project. Surely the community can help by re-implement jogl-prism and adding raw JOGL support into OpenJFX to ease future OpenJFX porting efforts.

JOGL v2 is actively maintained by the JogAmp community.

JOGL v2 now runs on the latest GPU cores and work on top of any JVM. JOGL v2 contains its own platform independent NEWT windowing toolkit. NEWT applications targeting the GL2ES2 or GL2ES1 profile, both using a common subset of OpenGL and ES calls, can be deployed across different platforms and devices from desktop to mobile without code change. – Documentation, slides, and videorecording from the latest live JogAmp demonstrations

Java3D is now also maintained by some members of the JogAmp community.
hharrison now maintain Java3D on github
Julien Gouesse: Java 3D est de retour [Java 3D is back]

Older Posts »

Powered by WordPress