Login  Register

Re: How to refer GL context in AWT Mouse Event

Posted by nj on May 30, 2017; 10:55am
URL: https://forum.jogamp.org/How-to-refer-GL-context-in-AWT-Mouse-Event-tp4037905p4038017.html

Thank you for you answer.

Then i should wrote like

public void mousePressed(MouseEvent mouseEvent) {
   float[] scale = new float[2];
   /*void*/getCurrentSurfaceScale(scale);
   float x = scale[0] * mouseEvent.getX();
   float y = scale[1] * mouseEvent.getY();
   setMousePressedLocation(x,y);
}


by the way,
can I refer GL context in SwingUtilities#invokeLater()
how can i use it safely ?

Regards,