X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_init.c;h=d8e87e05d8955e30c4ed96889aa89dbe461b1475;hb=fd07952449ad7b1fc6cfed569d23677f2b816e40;hp=1af391e3b3ddf9198dcfc1c8c69f704ef065436d;hpb=76abafb9109bfc14c93c9f86574b7a1ce1dae957;p=freeglut diff --git a/src/Common/freeglut_init.c b/src/Common/freeglut_init.c index 1af391e..d8e87e0 100644 --- a/src/Common/freeglut_init.c +++ b/src/Common/freeglut_init.c @@ -99,6 +99,7 @@ SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */ extern void fgPlatformInitialize( const char* displayName ); extern void fgPlatformDeinitialiseInputDevices ( void ); extern void fgPlatformCloseDisplay ( void ); +extern void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext ); void fghParseCommandLineArguments ( int* pargc, char** argv, char **pDisplayName, char **pGeometry ) @@ -234,10 +235,7 @@ void fgDeinitialize( void ) /* If there was a menu created, destroy the rendering context */ if( fgStructure.MenuContext ) { -#if TARGET_HOST_POSIX_X11 - /* Note that the MVisualInfo is not owned by the MenuContext! */ - glXDestroyContext( fgDisplay.pDisplay.Display, fgStructure.MenuContext->MContext ); -#endif + fgPlatformDestroyContext (fgDisplay.pDisplay, fgStructure.MenuContext->MContext ); free( fgStructure.MenuContext ); fgStructure.MenuContext = NULL; }