Пример #1
0
/* Quit OpenGL */
void CGX_GL_Quit(_THIS)
{
#if SDL_VIDEO_OPENGL
	if ( glcont != NULL ) {
		AmigaMesaDestroyContext(glcont);
		glcont = NULL;
		this->gl_data->gl_active = 0;
		this->gl_config.driver_loaded = 0;
	}
#endif
}
Пример #2
0
void _glfwPlatformCloseWindow( void )
{
    // Restore mouse pointer (if hidden)
    _glfwPlatformShowMouseCursor();

    // Destroy OpenGL context
    if( _glfwWin.Context )
    {
#ifdef _GLFW_STORMMESA
        AmigaMesaDestroyContext( _glfwWin.Context );
#endif
        _glfwWin.Context = NULL;
    }

    // Close window
    if( _glfwWin.Window )
    {
        CloseWindow( _glfwWin.Window );
        _glfwWin.Window = NULL;
    }

    // Close screen
    if( _glfwWin.Fullscreen && _glfwWin.Screen )
    {
        CloseScreen( _glfwWin.Screen );
    }
    _glfwWin.Screen = NULL;

    // Close input device I/O request
    if( _glfwWin.InputIO )
    {
        CloseDevice( (struct IORequest *) _glfwWin.InputIO );
        DeleteExtIO( (struct IORequest *) _glfwWin.InputIO );
        _glfwWin.InputIO = NULL;
    }

    // Close input device message port
    if( _glfwWin.InputMP )
    {
        DeletePort( _glfwWin.InputMP );
        _glfwWin.InputMP = NULL;
    }

}