Hi everyone,
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?
Cheers,
Thibault.
you can try using freeglut
It’s an alternative to glut, but is quite compatible
with glut’s functions
It allows you to specify what action to take
when selecting the close button.
Although I did do an fps check on glut vs. freeglut
and for some odd reason I get about 1300 fps with
freeglut and 2000 fps in speed with glut :S
But freeglut is currently being maintained
by steve baker so hopefully it’ll improve
over time
Here’s a link to the web page
http://freeglut.sourceforge.net/
Hi ! I decided to choose GLFW which solved out all the thread-related issues !