Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX
Posted by
Xerxes Rånby on
Jan 06, 2013; 1:50am
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4027717.html
noxo wrote
Couldn't resist myself playing few hours on LibGDX and Raspberry PI today..
Here's some findings:
==============
LIBGDX native libraries compiled on Raspberry PI fine by slightly modifying existing Linux ANT build scripts.
What I did was just remove -m32 and -msse flags. Not sure if additional stuff is needed for cross compile
environment, and if additional options are needed to opmitize for ARM/RPI.
The compiled library is also in my fork of libGDX, if anyone want to try :)
https://github.com/noxo/libgdx/blob/master/prebuild-raspberry-pi/gdx-natives-arm.jarI also tried quick and dirty of getting rid of GLCanvas sitting in JPanel, and moving everything under GLWindow to
get UI running on Raspberry PI... The UI is now showing up on RPI (with and without X), but I wasn't able
to receive mouse events into Window. Game works perfectly on PC under GLWindow. I haven't played a
lot with JOGL, so might be some noob stuff that I'm missing out.

Everything is checked in Github, so free feel to try & comment

WOW! and welcome! :)
It is odd that you do not receive mouse events because I think you should both from within and outside X11:
The Raspberry Pi OpenGL ES paints hardware accelerated directly on top of the frame-buffer from the console. Therefore we do not have the luxury of having an existing high level windowing toolkit that can feed us keyboard and mouse events on the Raspberry Pi.
For Raspberry Pi mouse input we use a "LinuxMouseTracker" that reads directly from the Linux kernels /dev/input/mice device file:
The LinuxMouseTracker code used by the Raspberry Pi NEWT is implemented here:
https://github.com/sgothel/jogl/blob/master/src/newt/classes/jogamp/newt/driver/linux/LinuxMouseTracker.java* When I run the JogAmp JOGL tests like the Gears demo i notice that this mouse tracker only kicks in and activate after i have pressed the middle mouse button.
Quick instructions on how to run the JOGL Gears demo using NEWT on the Raspberry Pi to try the mouse tracker:
https://gist.github.com/55de4fd65bfadae26203Keyboard and joystick input on the RaspberryPi is still a TODO.
New code has to be added that supports all HID input devices directly from the console.
It looks like working on input libs is the king thing to do for January 2013.