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 4 of 4

Thread: exitting in GLUT

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2003
    Posts
    3

    exitting in GLUT

    I've got a problem that my program SHOULD do some cleanup before it gets terminated.

    The function should be called just after glutmainloop has ended, but glutmainloop normally shuts down the whole task!
    What can I do about it? Help!

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

    Re: exitting in GLUT

    Originally posted by szucst:
    I've got a problem that my program SHOULD do some cleanup before it gets terminated.

    The function should be called just after glutmainloop has ended, but glutmainloop normally shuts down the whole task!
    What can I do about it? Help!
    http://www.mathies.com/glfaq/

    Fixing GLUT's "X" button close window exit() bug
    --
    Jim Mathies http://www.mathies.com/

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

  3. #3
    Junior Member Regular Contributor
    Join Date
    May 2002
    Location
    York, UK
    Posts
    128

    Re: exitting in GLUT

    Hi,

    Go to my web pages and get a fixed glut
    which provides glutWMCloseFunc() which
    allows you to register a callback which is activated when the windows "X" close button
    is pressed (as well as in response to the XWindows ClientMessage).
    http://www-users.york.ac.uk/~rpf1/glut/


    (See ~rpf1/glut.html for info )

    Rob

  4. #4
    Junior Member Newbie
    Join Date
    Feb 2003
    Posts
    3

    Re: exitting in GLUT

    thanks!

Posting Permissions

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