Archived

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

Astroguru

How to detect a glut close window event?

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