Archived

This topic is now archived and is closed to further replies.

How to detect a glut close window event?

This topic is 5003 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. Can someone tell me how to detect that a glut window is being closed so that i can process some commands before exiting. I have allocated memory dynamically to objects using new , which i want to deallocate before the program exits. Thanks.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
AFAIK, there''s no such callback in GLUT. A common (but not so elegant) workaround is to have a class with one global instance and do cleanup in the destructor.

This is one of the many reasons I don''t like GLUT.

Share this post


Link to post
Share on other sites