title: glutCloseFunc without terminating application
body: <p>I have created a window with <code>glutCreateWindow</code> and started a loop using <code>glutMainLoop</code>. I want to end that loop and close the window so I use <code>glutLeaveMainLoop</code> and <code>glutCloseFunc</code> to destroy it. Automatically, my application terminates.</p>
  
  <p>I would like the application to persist after the window is destroyed. Is it possible?</p>
  
  <p>According to this <a href="http://linux.die.net/man/3/glutclosefunc" rel="nofollow">link</a> I can do it, however I don't know how. I'm using <em>freeglut</em>.</p>