Package: freeglut3 Version: 2.2.0-8 Severity: normal Tags: patch Issuing glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_CONTINUE_EXECUTION); is supposed to make glutMainLoop() return upon window close (instead of exiting as with standard GLUT). This option has no effect in freeglut 2.2.0, though.
There is a fix for this in the freeglut CVS repository. A patch to make this fix is attached. -- System Information: Debian Release: 3.1 APT prefers testing Architecture: i386 (i686) Kernel: Linux 2.6.11 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages freeglut3 depends on: ii freeglut3 [libglut3] 2.2.0-8dt OpenGL Utility Toolkit ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii libglut3 3.7-25 the OpenGL Utility Toolkit ii libx11-6 4.3.0.dfsg.1-12.0.1 X Window System protocol client li ii libxext6 4.3.0.dfsg.1-12.0.1 X Window System miscellaneous exte ii xlibmesa-gl [libgl1] 4.3.0.dfsg.1-12.0.1 Mesa 3D graphics library [XFree86] ii xlibmesa-glu [libglu 4.3.0.dfsg.1-12.0.1 Mesa OpenGL utility library [XFree ii xlibs 4.3.0.dfsg.1-12 X Keyboard Extension (XKB) configu -- no debconf information *** /home/dtorop/src/freeglut/freeglut-continue-exec.patch --- freeglut-2.2.0-orig/src/freeglut_main.c 2004-03-30 03:37:27.000000000 -0500 +++ freeglut-2.2.0/src/freeglut_main.c 2005-04-26 00:30:37.000000000 -0400 @@ -1062,6 +1062,8 @@ */ void FGAPIENTRY glutMainLoop( void ) { + int action; + #if TARGET_HOST_WIN32 SFG_Window *window = (SFG_Window *)fgStructure.Windows.First ; #endif @@ -1122,9 +1124,12 @@ /* * When this loop terminates, destroy the display, state and structure * of a freeglut session, so that another glutInit() call can happen + * + * Save the "ActionOnWindowClose" because "fgDeinitialize" resets it. */ + action = fgState.ActionOnWindowClose; fgDeinitialize( ); - if( fgState.ActionOnWindowClose == GLUT_ACTION_EXIT ) + if( action == GLUT_ACTION_EXIT ) exit( 0 ); }