Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Glut exit callback?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 rileyriley   Members   -  Reputation: 235

Like
Likes
Like

Posted 04 January 2001 - 12:39 PM

I want to be able to clean up after my program when the user exits (I''m using glut on a mac). When they click the close button on the window, the program just up and exits, with no warning. I put some code under the call to glutMainLoop but it never gets run. Is there a function like glutExitFunc(callback) that I can use to clean up after my program when the user closes the window? Thanks for any help. /riley

Sponsor:

#2 soreno   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 January 2001 - 10:12 PM

Short answer No.
But check: http://www.opengl.org/developers/faqs/technical/glut.htm#glot0090

Mvh
Søren Olesen


#3 Protozone   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 January 2001 - 01:57 AM

Before calling glutMainLoop(), make a call to atexit(func_to_be_called);
where "func_to_be_called" is the function you want to be called just before your program exits.
Cheers.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS