mouse handling on AWT and also NEWT
Posted by Cork on Nov 24, 2010; 2:00pm
URL: https://forum.jogamp.org/mouse-handling-on-AWT-and-also-NEWT-tp1960775.html
how are people handling 1st person fps type mouse control with JOGL2?
I'm using this to hide the mouse (will probably have to redo this on focus gained or something after tabbing about different apps):
Image image = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(16, 16, pixels, 0, 16));
Cursor transparentCursor = Toolkit.getDefaultToolkit().createCustomCursor(
image, new Point(0, 0), "invisibleCursor");
But what about tracking mouse movement without the mouse leaving the frame? Robot to reset the position?
Or does JOGL include some utility methods for this type of thing?
How about drawing the static cross-hairs in the center of the screen? just some none rotated geometry? or something a bit fancier?
How does it compare when doing the same on NEWT? ie no AWT or probably toolkit??
Also is there a good NEWT starting point for this type of project? I installed git to dl the demos source but couldn't find a good reference for a NEWT desktop app.