March 19th, 2008, 01:50 AM
I'm taking a class learning about 3d Animation and programming with openGL. We created a model of a lamp for our first assignment and have since used it in each new project, just adding new functions to it. I have programmed the ability to push a key on the keyboard and have the lamp rotate around an axis I've chosen. But now, i need to be able to press the left mouse button anywhere in the window and have the lamp rotate until the button is released. I've tried setting up a while loop that says while the state is GLUT_DOWN, rotate, but when i click, nothing changes, and the program actually locks up on me. If anyone can help with this it'd be very much appreciated.