Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX
Posted by krishnak on Mar 10, 2013; 1:11am
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4028568.html
With reference to the ASDW key events in JMonkey and Raspberry Pi, I wanted to give an update.
Case 1:
If I extend a SimpleApplication and enable FlyCam.
ASDW keys move the camera, when I use JOGL on a PC.
Code does not have any additional listeners.
The same code when executed on a Pi, ASDW keys DO NOT move the camera.
Case 2:
If I extend a SimpleApplication and DISABLE FlyCam.
this time the code has additional listeners and Mapping as below
inputManager.addMapping("Left", new KeyTrigger(KeyInput.KEY_A));
inputManager.addMapping("Right", new KeyTrigger(KeyInput.KEY_D));
inputManager.addMapping("Up", new KeyTrigger(KeyInput.KEY_W));
inputManager.addMapping("Down", new KeyTrigger(KeyInput.KEY_S));
inputManager.addMapping("Jump", new KeyTrigger(KeyInput.KEY_SPACE));
inputManager.addListener(this, "Left");
inputManager.addListener(this, "Right");
inputManager.addListener(this, "Up");
inputManager.addListener(this, "Down");
inputManager.addListener(this, "Jump");
With this - the ASDW keys move the camera position both in Raspberry Pi as well as on PC