PDA

View Full Version : glut close windows on OSX



John Qualis
03-02-2011, 10:22 AM
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.

carsten neumann
03-02-2011, 01:21 PM
Is switching GLUT implementations an option for you? Using openglut or freeglut instead of what you are using currently is perhaps the easiest solution.