Jump to content
  • Advertisement

Archived

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

Astroguru

How to detect a glut close window event?

This topic is 5216 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!