In Java /w OpenGL, how do I get and set the cursor position?
A lot of people say to use GLUTWarpPointer for setting the position, but which Class is that?
In Java /w OpenGL , how do I get and set the cursor position?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need to use OpenGL specific libraries to do this, it can easily be accomplished with the Robot class, which contains a
mouseMove()method – it does what it says on the tin.As far as I’m aware both Robot and GLUTWarpPointer generate low level system events to move the mouse, thus achieving the same thing. I assume you’re using JOGL which as far as I know doesn’t expose the mouse moving functionality of GLUTWarpPointer, so if that’s correct
Robotis probably the only sensible option.