Login  Register

Re: mouse input

Posted by gouessej on Nov 14, 2011; 11:08am
URL: https://forum.jogamp.org/SOLVED-mouse-input-tp3504609p3506508.html

Hi

According to the title of this thread, I have to say that JInput does not solve your problem any better than NEWT. I know it allows the use of joypads and various controllers but it has some annoying limitations.

Your AWT solution might be slow, mine is used in a real first person shooter and it worked even before I switched to vertex arrays and VBOs in 2007. Michael Bien and "Riven" helped me to write this, feel free to reuse this piece of code even in non GPL source code:
http://tuer.svn.sourceforge.net/viewvc/tuer/alpha/main/GameMouseMotionController.java?revision=378&view=markup

This permission problem is not on Windows except on some machines when the user has no administration rights. A better solution consists in using the AWT plug-in of JInput if you need to use the mouse and the keyboard. You should use JInput directly only for joypads and in this case changing the permissions of some files is not required on a lot of Linux distros (as joypad data are not considered "sensible", they are accessible for any user). If you don't really need to use joypads yet, even using directly AWT will cause you less trouble, NEWT will give a very little bit better results (but be aware of the bug 525). In the future, I will need to integrate JInput in NEWT, I will probably write a NEWT plug-in for JInput so that we can use JInput with NEWT, it will allow to use both the keyboard, the mouse and the joypads with NEWT without AWT with excellent performances without having to modify permissions of some files. I suggested a fix for the bug 525, you can try to rebuild JOGL with this fix, it should work fine. Good luck.
Julien Gouesse | Personal blog | Website