PDA

View Full Version : exitting in GLUT



szucst
02-04-2003, 01:01 PM
I've got a problem that my program SHOULD do some cleanup before it gets terminated.

The function should be called just after glutmainloop has ended, but glutmainloop normally shuts down the whole task!
What can I do about it? Help!

jmathies
02-04-2003, 02:00 PM
Originally posted by szucst:
I've got a problem that my program SHOULD do some cleanup before it gets terminated.

The function should be called just after glutmainloop has ended, but glutmainloop normally shuts down the whole task!
What can I do about it? Help!

http://www.mathies.com/glfaq/

Fixing GLUT's "X" button close window exit() bug

Rob Fletcher
02-05-2003, 12:40 AM
Hi,

Go to my web pages and get a fixed glut
which provides glutWMCloseFunc() which
allows you to register a callback which is activated when the windows "X" close button
is pressed (as well as in response to the XWindows ClientMessage).
http://www-users.york.ac.uk/~rpf1/glut/


(See ~rpf1/glut.html for info )

Rob

szucst
02-07-2003, 01:41 AM
thanks!