View Full Version : Mouse
Hello,
I need determine the position of the mouse, using glut functions, if possible...
Please could someone help me?
Thanks... Pera...
http://www.fatech.com/tech/opengl/glut/index.php3?9
Thank you very much for the link, sorry if I didn't find it on the page, but I'm Looking for a function like glutGetMousePos (it's just a name I imagined), that returns me the position of the mouse.
I can do what I need with the glutPassiveMotionFunc, but if the function like the one I described exists, it will be very nicer.
Thanks again... Pera
Why don't you just keep track of the mouse position yourself whenever you get a callback?
Gavin
06-06-2001, 01:48 AM
in the passive func just do...
/** global **/
int mouse_x, mouse_y;
myPassiveMotionFunc(int x, int y)
{
mouse_x = x;
mouse_y = y;
}
the posn's are there any time you want top check them then.
also use the motion func for when you are using mouse events (button pushes)
Thanks everybody...
I think that now I can do what need in a nice way...
Thanks again... Pera
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.