Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: closing glut windows from within code

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2002
    Posts
    14

    closing glut windows from within code

    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

    Ta

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2002
    Location
    hoboken
    Posts
    10

    Re: closing glut windows from within code

    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.
    3D Land. The place where you can play God.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    133

    Re: closing glut windows from within code

    Try glutDestroyWindow( id ).

    Regards,
    Jim
    --
    Jim Mathies http://www.mathies.com/

    \"The best way to predict the future is to invent it."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •