Esempio n. 1
0
/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem. The state structure is also nulled out.
**
*/
void GLimp_Shutdown( void )
{
    if( glw_state.windowMutex )
        ri.Mutex_Destroy( &glw_state.windowMutex );
    if( glw_state.context != EGL_NO_CONTEXT )
    {
        qeglMakeCurrent( glw_state.display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
        qeglDestroyContext( glw_state.display, glw_state.context );
        glw_state.context = EGL_NO_CONTEXT;
    }
    if( glw_state.surface != EGL_NO_SURFACE )
    {
        qeglDestroySurface( glw_state.display, glw_state.surface );
        glw_state.surface = EGL_NO_SURFACE;
    }
    if( glw_state.noWindowPbuffer != EGL_NO_SURFACE )
    {
        qeglDestroySurface( glw_state.display, glw_state.noWindowPbuffer );
        glw_state.noWindowPbuffer = EGL_NO_SURFACE;
    }
    if( glw_state.mainThreadPbuffer != EGL_NO_SURFACE )
    {
        qeglDestroySurface( glw_state.display, glw_state.mainThreadPbuffer );
        glw_state.mainThreadPbuffer = EGL_NO_SURFACE;
    }
    if( glw_state.display != EGL_NO_DISPLAY )
    {
        qeglTerminate( glw_state.display );
        glw_state.display = EGL_NO_DISPLAY;
    }
}
Esempio n. 2
0
/*
** GLimp_Shutdown
**
** This routine does all OS specific shutdown procedures for the OpenGL
** subsystem.  Under OpenGL this means NULLing out the current DC and
** HGLRC, deleting the rendering context, and releasing the DC acquired
** for the window.  The state structure is also nulled out.
**
*/
void GLimp_Shutdown( void )
{
	if( glw_state.context != EGL_NO_CONTEXT )
	{
		qeglMakeCurrent( glw_state.display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
		qeglDestroyContext( glw_state.display, glw_state.context );
		glw_state.context = EGL_NO_CONTEXT;
	}
	if( glw_state.surface != EGL_NO_SURFACE )
	{
		qeglDestroySurface( glw_state.display, glw_state.surface );
		glw_state.surface = EGL_NO_SURFACE;
	}
	if( glw_state.pbufferSurface != EGL_NO_SURFACE )
	{
		qeglDestroySurface( glw_state.display, glw_state.pbufferSurface );
		glw_state.surface = EGL_NO_SURFACE;
	}
	if( glw_state.display != EGL_NO_DISPLAY )
	{
		qeglTerminate( glw_state.display );
		glw_state.display = EGL_NO_DISPLAY;
	}
}
Esempio n. 3
0
/*
** GLimp_SharedContext_Destroy
*/
void GLimp_SharedContext_Destroy( void *context, void *surface )
{
	qeglDestroyContext( glw_state.display, context );
	qeglDestroySurface( glw_state.display, surface );
}