Create a popup menu that doesn't stop animations


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:

glutAddMenuEntry("Run animation", 1);
glutAddMenuEntry("Stop animation", 2);
glutAddMenuEntry("Exit", 99);

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!

IIRC try using glutPostRedisplay() at the end of your menu callback code.