I am using GLUT on OSX (10.6.x) from a C++ program. I want to call a function in the program as a callback when the glut window is destroyed by clicking on “X”. I don’t find a “glutCloseFunc” or glutWMCloseFunc in my GLUT implementation. How can I get this callback function to be called?
Any help is appreciated. Thanks in advance.