I have created a window with glutCreateWindow and started a loop using glutMainLoop. I want to end that loop and close the window so I use glutLeaveMainLoop and glutCloseFunc to destroy it. Automatically, my application terminates.
I would like the application to persist after the window is destroyed. Is it possible?
According to this link I can do it, however I don't know how. I'm using freeglut.
In the doc for
glutCloseFunc():which leads to the
glutSetOption()docs:And from
glutLeaveMainLoop():Putting the pieces together: