Mouse positions

is there a function in glut like the windows functions GetCursorPos and SetCursorPos. If not what would be the best way of simulating these functions using glut. In other words I would like my app to be cross platform windows/unix

Yes

glutMouseFunc Read mouse on button press
glutMotionFunc Read mouse on button and motion
glutPassiveMotionFunc Read mouse when in
window

There is a set mouse location, but can not think of the call.

Originally posted by mdog1234:
is there a function in glut like the windows functions GetCursorPos and SetCursorPos. If not what would be the best way of simulating these functions using glut. In other words I would like my app to be cross platform windows/unix

[This message has been edited by nexusone (edited 02-19-2003).]

to set the mouse position in glut use glutWarpPointer(int x, int y). i don’t think there is an equivalent get routine, so use the callbacks mentioned by nexusone.

jebus