Moving an X11-specific function call to destroy a context to the X11-specific file
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1064 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
1bcc27f30c
commit
44b2dd8c3b
@ -99,6 +99,7 @@ SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */
|
|||||||
extern void fgPlatformInitialize( const char* displayName );
|
extern void fgPlatformInitialize( const char* displayName );
|
||||||
extern void fgPlatformDeinitialiseInputDevices ( void );
|
extern void fgPlatformDeinitialiseInputDevices ( void );
|
||||||
extern void fgPlatformCloseDisplay ( void );
|
extern void fgPlatformCloseDisplay ( void );
|
||||||
|
extern void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext );
|
||||||
|
|
||||||
|
|
||||||
void fghParseCommandLineArguments ( int* pargc, char** argv, char **pDisplayName, char **pGeometry )
|
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 there was a menu created, destroy the rendering context */
|
||||||
if( fgStructure.MenuContext )
|
if( fgStructure.MenuContext )
|
||||||
{
|
{
|
||||||
#if TARGET_HOST_POSIX_X11
|
fgPlatformDestroyContext (fgDisplay.pDisplay, fgStructure.MenuContext->MContext );
|
||||||
/* Note that the MVisualInfo is not owned by the MenuContext! */
|
|
||||||
glXDestroyContext( fgDisplay.pDisplay.Display, fgStructure.MenuContext->MContext );
|
|
||||||
#endif
|
|
||||||
free( fgStructure.MenuContext );
|
free( fgStructure.MenuContext );
|
||||||
fgStructure.MenuContext = NULL;
|
fgStructure.MenuContext = NULL;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,10 @@ void fgPlatformCloseDisplay ( void )
|
|||||||
timeEndPeriod ( 1 );
|
timeEndPeriod ( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
|
||||||
|
{
|
||||||
|
/* Do nothing -- this is required for X11 */
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Everything down to the end of the next two functions is copied from the X sources.
|
* Everything down to the end of the next two functions is copied from the X sources.
|
||||||
|
@ -265,3 +265,9 @@ void fgPlatformCloseDisplay ( void )
|
|||||||
XCloseDisplay( fgDisplay.pDisplay.Display );
|
XCloseDisplay( fgDisplay.pDisplay.Display );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext )
|
||||||
|
{
|
||||||
|
/* Note that the MVisualInfo is not owned by the MenuContext! */
|
||||||
|
glXDestroyContext( pDisplay.Display, MContext );
|
||||||
|
}
|
Reference in New Issue
Block a user