PDA

View Full Version : Exiting a window under GLUT



nexusone
02-18-2002, 11:52 AM
I have been using the [ESC] key to exit my glut based programs.
Is there a glut event command for a windows signals like mouse click on the X box to close.

marcus256
02-19-2002, 06:50 AM
I'm pretty sure there isn't (I mean, GLUT kills your app once you click the X button).

Check out GLFW instead: http://hem.passagen.se/opengl/glfw/

It can detect the window being closed. See the included docs and examples for how it works.

Note: There is a difference between how it works under Windows and how it works under X11. Under X11 the 'X' button normally means "kill application", not "close window".

nexusone
02-19-2002, 06:58 AM
The problem I am having is when I close the window with the X button, the windows closes but the program keeps running in the background. Then I have to kill it, to get it to exit.



Originally posted by marcus256:
I'm pretty sure there isn't (I mean, GLUT kills your app once you click the X button).

Check out GLFW instead: http://hem.passagen.se/opengl/glfw/

It can detect the window being closed. See the included docs and examples for how it works.

Note: There is a difference between how it works under Windows and how it works under X11. Under X11 the 'X' button normally means "kill application", not "close window".