I created in my main progran a pthread that opens a GLUT window. This works perfectly, both processes run in parallel. But when I close the GLUT window, it exits also my main process.
Is there a way so that when the user closes the GLUT window, instead of calling exit(0) it just exits the thread (pthread_exit()) ?
I saw an idea hacking GLUT : http://www.opengl.org/discussion_boards/…true#Post219375 ,
but I really would like to stay with normal GLUT. Do you think there is a way to achieve it?