In Jogl, how to pass the mouseEvent down to OpenGL mouseEventCB? Any specific Jogl API?
Thanks.
In Jogl, how to pass the mouseEvent down to OpenGL mouseEventCB? Any specific Jogl API?
Thanks.
Hi,
OpenGL is just a graphics API that helps you draw triangles, etc to the screen. It doesn’t do any input processing like mouse handling.
The funciton you are referring to belongs probably to some kind of additional library that you used under C++ (or whatever you used as programming language before Java/JoGL).
If you want some form of mouse handling you have to either do it yourself (maybe using opengl picking-mode) or look at one of the higher-level APIs layerd on top of JoGL like OpenMind (has picking suport) or Xith3d (haven’t worked with it yet, but probably has something similar).
Maybe you can also specify what exactly you want to accomplish (rotate camera/select object/…), then maybe someone can give you additional pointers.
Regards,
Jan