Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Glut exit callback?

4: Adsense

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   

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

#2 soreno   Members   

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   

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.