From fdd636071211c9fd1739c041bcbc363c87224b50 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 31 Dec 2011 15:34:35 +0100 Subject: [PATCH] Get rid of Sys_PauseGL() and Sys_ResumeGL() Unused functions in the OSX backend. --- neo/sys/osx/macosx_glimp.mm | 30 ------------------------------ neo/sys/osx/macosx_sys.h | 4 ---- 2 files changed, 34 deletions(-) diff --git a/neo/sys/osx/macosx_glimp.mm b/neo/sys/osx/macosx_glimp.mm index d958999d..28073b1c 100644 --- a/neo/sys/osx/macosx_glimp.mm +++ b/neo/sys/osx/macosx_glimp.mm @@ -418,36 +418,6 @@ static bool CreateGameWindow( glimpParms_t parms ) { return true; } -// This can be used to temporarily disassociate the GL context from the screen so that CoreGraphics can be used to draw to the screen. -void Sys_PauseGL () { - if (!glw_state.glPauseCount) { - qglFinish (); // must do this to ensure the queue is complete - - // Have to call both to actually deallocate kernel resources and free the NSSurface - CGLClearDrawable(OSX_GetCGLContext()); - [OSX_GetNSGLContext() clearDrawable]; - } - glw_state.glPauseCount++; -} - -// This can be used to reverse the pausing caused by Sys_PauseGL() -void Sys_ResumeGL () { - if (glw_state.glPauseCount) { - glw_state.glPauseCount--; - if (!glw_state.glPauseCount) { - if (!glConfig.isFullscreen) { - [OSX_GetNSGLContext() setView: [glw_state.window contentView]]; - } else { - CGLError err; - - err = CGLSetFullScreen(OSX_GetCGLContext()); - if (err) - common->Printf("CGLSetFullScreen -> %d (%s)\n", err, CGLErrorString(err)); - } - } - } -} - /* =================== GLimp_Init diff --git a/neo/sys/osx/macosx_sys.h b/neo/sys/osx/macosx_sys.h index fc4f36c5..69108d94 100644 --- a/neo/sys/osx/macosx_sys.h +++ b/neo/sys/osx/macosx_sys.h @@ -63,7 +63,3 @@ do { \ [NSOpenGLContext clearCurrentContext]; \ glw_state._ctx_is_current = NO; \ } while (0) - - -void Sys_PauseGL(); -void Sys_ResumeGL();