I need to do some operations when the users input something( Key pressed or Mouse Clicked). However I can’t get the GL object in the functions of keyPressed or mousePressed. How can I get the GL object in these functions?
I can’t do these operations in the display function, because it takes long time (1 second).
Thank you very much!