PDA

View Full Version : Mouse help in GLUT



ajrosen
04-13-2001, 04:57 PM
I am writing a small application for class, and I am trying to enable movement about a scene using the mouse. I am using the GLUT libraries, and am somewhat restricted to them, as I am writing this on a windows machine, but it needs to run on a Unix machine for grading, so I don't know if glut will let me do what I want, which is:

1) set the cursor position, to allow the user to move around the scene without the cursor coming out of the window, and
2) have a function run while a mouse button is held down.

I can set the callback function for the mouse click, but it only calls it once per press, and I can't find a state variable that tells me the status of the button.

Any help would be greatly appreciated! Thanks!

Adam J. Rosen

mango
04-13-2001, 07:20 PM
1. glutWarpPointer http://sites.netscape.net/ptrpck/glutman/glutWarpPointer.html
2. is answered here: http://www.fatech.com/tech/opengl/glut/index.php3?9