Skip to content

Instantly share code, notes, and snippets.

@xranby
Last active Dec 5, 2021
Embed
What would you like to do?
# Download the gluegen-rt, jogl and native armel/armhf libs for the Pi (~3Mb)
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6.jar
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6hf.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6hf.jar
# You can now run JOGL Version
java -cp jogl-all.jar:gluegen-rt.jar com.jogamp.opengl.JoglVersion
# Download the JOGL unittests (~1Mb).
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-test.jar
wget http://jogamp.org/deployment/jogamp-current/jar/junit.jar
# Run the unittests.
# Example of valid options to the NEWT unittest are: -width 1980 -height 1080 -time 40000
# Get some spinning Gears running: (the gears can be rotated by clicking and moving the mouse)
java -cp jogl-test.jar:junit.jar:jogl-all.jar:gluegen-rt.jar com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -width 1980 -height 1080 -time 40000
# Test movie playback: (the movie cube can also be rotated using the mouse)
# Use -file ... -url file://... or -url http://... to load a custom movie.
# http://www.blender.org/features-gallery/movies/
# -url http://download.blender.org/demo/movies/ChairDivXL.avi
java -cp jogl-test.jar:jogl-all.jar:gluegen-rt.jar com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube -width 1980 -height 1080
#Download the JOGL-demo jar (~770kb).
# This contains a collection of 200+ precompiled JOGL demos
wget http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar
#Run some of the jogl-demos:
java -cp jogl-demos.jar:jogl-all.jar:gluegen-rt.jar RawGL2ES2demo
# The JOGL-demo jar also contains a handy tool demos.GLNewtRun that allows startup of any java class that implements GLEventListener
# Here we use the demos.GLNewtRun tool to start some classes from the jogl-test jar that do not have a main method.
java -cp jogl-demos.jar:junit.jar:jogl-test.jar:jogl-all.jar:gluegen-rt.jar demos.GLNewtRun -time 40000 com.jogamp.opengl.test.junit.jogl.demos.es1.PointsDemoES1
# Trouble below...
# Example of broken, things that needs eyeballing:
# There exist some jogl-test that uses shader extensions that is not yet supported by the Broadcom driver on the Raspberry Pi
# Broadcom engineers, please take a look at these tests and update your firmware.
# Sourcecode to the ElektronenMultiplizierer shader is located here: https://github.com/sgothel/jogl/blob/master/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_port.fp
java -cp jogl-demos.jar:junit.jar:jogl-test.jar:jogl-all.jar:gluegen-rt.jar demos.GLNewtRun -time 40000 com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer
# TODO JOGL got a FixedFunction emulation pipeline, its shaders can refuse to compile using the pi drivers.
java -cp jogl-demos.jar:jogl-all.jar:gluegen-rt.jar demos.es1.angeles.Main
# TODO JOGL Swing and awt integration is still not working on the raspberry pi,
# right now code that is only using NEWT will work on the Pi.
# http://jogamp.org/jogl/doc/NEWT-Overview.html
# This limitation prevents running the JOGL webbrowser demo applets on the pi
# https://jogamp.org/bugzilla/show_bug.cgi?id=626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment