Hi All,
I am trying to access the GL object as follows from a GLCanvas object i hold as member variable:
public void keyPressed(KeyEvent e)
{
System.out.println(angle);
if (e.getKeyCode() == KeyEvent.VK_UP)
angle += 1f;
if (e.getKeyCode() == KeyEvent.VK_DOWN)
angle -= 1f;
examineModelViewMatrix(canvas.getGL());
}
However, I read the following within GLCanvas javadoc:
And this is clearly the case as my modelview matrix is all zeros when i try to access it in this way, whereas if i access it in display(), for instance, i get a matrix in the form one would expect after rotation is applied.
So, who can tell me how to access the GL from input callback methods?