From 2dc6a8fa66bae8eed48c80c10dee24fb4ae95b53 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 21 Jan 2006 13:40:01 +0000 Subject: [PATCH] Cleanup and use core graphics directly to swap buffers rather than going though the overhead of the obj-c calls. --- stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm index 62811c00ea..4800a63627 100644 --- a/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm +++ b/stepmania/src/arch/LowLevelWindow/LowLevelWindow_Cocoa.mm @@ -409,8 +409,7 @@ void LowLevelWindow_Cocoa::GetDisplayResolutions( DisplayResolutions &dr ) const void LowLevelWindow_Cocoa::SwapBuffers() { - // XXX don't use Obj-C here, use CG. - [[NSOpenGLContext currentContext] flushBuffer]; + CGLFlushDrawable( CGLGetCurrentContext() ); } void LowLevelWindow_Cocoa::Update() @@ -430,7 +429,6 @@ void LowLevelWindow_Cocoa::Update() void LowLevelWindow_Cocoa::BeginConcurrentRendering() { - LOG->Trace( __func__ ); if( m_CurrentParams.windowed ) [m_BGContext setView:[m_Window contentView]]; else @@ -440,7 +438,6 @@ void LowLevelWindow_Cocoa::BeginConcurrentRendering() void LowLevelWindow_Cocoa::EndConcurrentRendering() { - LOG->Trace( __func__ ); [NSOpenGLContext clearCurrentContext]; [m_BGContext clearDrawable]; }