PDA

View Full Version : Create a popup menu that doesn't stop animations



Jordi
12-18-2008, 06:41 AM
Hi!

I'm trying to program a popup menu that is activated by the click of the right mouse button. On the window I have an animation (an object rotates), and if I activate the menu, this animation stops.

I program under Windows and with GLUT:



glutCreateMenu(my_menu);
glutAddMenuEntry("Run animation", 1);
glutAddMenuEntry("Stop animation", 2);
glutAddMenuEntry("Exit", 99);
glutAttachMenu(GLUT_RIGHT_BUTTON);

My question is: Is there a way to program a menu that doesn't stop the animation?

Thanks a lot for your help and time!
Jordi

babis
12-18-2008, 11:00 AM
IIRC try using glutPostRedisplay() at the end of your menu callback code.