View Full Version : :confused:Glut and window close.
09-25-2000, 09:28 AM
How the hell do i detect that the user has closed a window using the close box in windows GLUT ?
The program just exits, without even calling the atexit callback, and i have some stuff to free !
Sorry, there's no exit handling in GLUT. Mainly because glutMainLoop is not supposed to end I guess.
And any unfreed memory, or unclosed files are (or at least SHOULD) be freed/closed by the operating system.
09-25-2000, 12:29 PM
I've used atexit() and it worked fine. Did you set it in your main before calling glutMainLoop() ?
09-26-2000, 04:59 AM
Anyway this is NOT good !
Any c/c++ beginner would have added a "window close" callback !
GLUT SUCKS and i'm not gonna use it !
And that's bad because the base idea of abstraction layer is great http://www.opengl.org/discussion_boards/ubb/frown.gif
Thanks for you help anyway.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.