From e7d7390db69d046aa5e5984f639683e4386ef4c8 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Fri, 21 Sep 2007 04:00:14 +0000 Subject: [PATCH] Implementing Larry Ramey's "glutExit" feature (see e-mails from him on 11/9/05, 6/28/06) git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@724 7f0cb862-5218-0410-a997-914c9d46530a --- include/GL/freeglut_ext.h | 1 + src/freeglut_init.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/GL/freeglut_ext.h b/include/GL/freeglut_ext.h index 4bff7da..5e4ad2c 100644 --- a/include/GL/freeglut_ext.h +++ b/include/GL/freeglut_ext.h @@ -83,6 +83,7 @@ */ FGAPI void FGAPIENTRY glutMainLoopEvent( void ); FGAPI void FGAPIENTRY glutLeaveMainLoop( void ); +FGAPI void FGAPIENTRY glutExit ( void ); /* * Window-specific callback functions, see freeglut_callbacks.c diff --git a/src/freeglut_init.c b/src/freeglut_init.c index 0c67719..99b6f20 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -653,6 +653,14 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) } /* + * Undoes all the "glutInit" stuff + */ +void FGAPIENTRY glutExit ( void ) +{ + fgDeinitialize (); +} + +/* * Sets the default initial window position for new windows */ void FGAPIENTRY glutInitWindowPosition( int x, int y ) -- 1.7.10.4