PDA

View Full Version : closing glut windows from within code



neilw
10-22-2002, 11:44 PM
Im having trouble working out how to do this?
I have a glut window which is being opened from within my code (a simulation of sorts) this window then displays the required output etc, but then how do i close this window when im done with it, and cause the program control flow to return to the code which first created the glut window?
All ive managed so far is either for the window just to stay, and program flow not to return to my code, or, for the whole program to quit out, both of which are not acceptable. So any help is greatly appreciated http://www.opengl.org/discussion_boards/ubb/smile.gif

Ta

iluvgfx
10-23-2002, 05:54 PM
Hi.

glutCreateWindow() returns a window id.

glutSetWindow(id) sets the window with "id" to be drawn. so when u close the render window set ur normal window.

hope my answer was not ambiguous.

Satish.

jmathies
10-25-2002, 09:01 AM
Try glutDestroyWindow( id ).

Regards,
Jim