07-15-2012 11:43 PM
I am just beginning the java development on BB OS7 (newbie for Java programming). I trying to modify the "OpenGL11Demo" example so that I can control the rotation of the animated cube. But how can I add the functions to listen the key input events in the GLField? I have inherited the keyChar(), keyUp(), keyDown() and other protected key event functions. But it CAN'T LISTEN ANY INPUT (seems no catch in debug).
However, I also check the "OpenglSpriteDemo" which implements AnimationListener inferface and inherits the above key event functions. It can capture key input.
I check some resource on internet but can't figure it out. Can someone help to give a suggestion? Should I forcely implement KeyListener on GLField when creating my own OpenGL field so that it can listen any key event? Thanks.