PDA

View Full Version : mouse navigation in GLUT



che
12-07-2003, 08:01 AM
Hi,

I have a problem programming the mouse navigation the way I want in my GLUT application.
I would like to hold the left mouse button pressed and rotate the 3D scene.
I am using the glutMouseFunc()-callback und the glutPassiveMotionFunc()-callback. But I can not rotate the scene during I am holding the mouse button pressed.
I think the problem is that, when any mouse button is hold pressed, the glutPassiveMotionFunc() can not do it's job.

Do you have any ideas, how to solve this problem?

Many thanks,
Che

aebrooks
12-11-2003, 12:58 PM
Have you tried setting up a boolean flag to control the rotation? I.e. when the mouse button is pressed it sets the flag true and your rotation operation runs and when the button is released the flag goes false and rotation stops.. Just a thought..