
Re: OpenGL-ES acceleration using JogAmp JOGL + OpenJDK
I have now managed to get the JOGL demos running using the nvidia tegra2 drivers.
GLES1 and GLES2 code work fine!
The 1st important part was to make sure that the JOGL code you want to run uses an GLES1, GLES2, GL2ES1 or GL2ES2 profile.
This blog explains:
http://michael-bien.com/mbien/entry/jog ... _explained 
If you port/create new Java JOGL code that uses the GL2ES1 or GL2ES2 profile then the code will run on both desktops and mobile devices!
The 2nd important part was to make sure that the JOGL demos got passed the jogl.all
-mobile.jar instead of jogl.all.jar or else you would find your code running using the software rendered mesa OpenGL instead of the tegra2 hardware rendered OpenGL-ES drivers for the GL2ES1 and GL2ES2 profiled code.
The tegra2 driver itself can only use the GLES1, GLES2 and VG profiles. The use of jogl.all
-mobile.jar makes GL2ES2 profile use GLES2 instead of GL.
Code:
# All classes ending with NEWT contain a main() method.
find jogl/src/test/com/jogamp/opengl/test/junit/jogl/demos/ | grep NEWT
# How to manually start the TestGearsES2NEWT junit demo
# Tip: try TestRedSquareES2NEWT as well.
java -Djava.library.path=gluegen/build-linux-armv7/obj/:jogl/build-linux-armv7/lib/ -cp gluegen/build-linux-armv7/gluegen.jar:jogl/build-linux-armv7/jar/jogl.all-mobile.jar:jogl-demos-git/build-linux-armv7/jogl-demos.jar:jogl-demos-git/build-linux-armv7/jogl-demos-data.jar:jogl-demos-git/build-linux-armv7/jogl-demos-utils.jar:jogl/build-linux-armv7/test/build/classes:/usr/share/java/junit4.jar com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT -time 50000
I have now verified that OpenJDK + jamvm, OpenJDK + cacao and OpenJDK + zero can be used to run JOGL accelerated applications using the Nvidia Tegra2 driver.
When running TestGearsES2NEWT 200x200 then the top fps ends as follow: cacao 1st place 98248.1 fps*, jamvm 63419.6 fps and zero 56619.7 fps on a shared 2nd place, all three JVM's performed good on the Cortex-A9 CPU in combination with the Tegra2 GPU!
* This high fps was obtained without having the output window visible in order to measure how fast the JVM can send frames to the GLES2 driver for rendering, if visual output are enabled then you will see Gears spinning around 200 fps for a 200x200 pixel output window.