Cleanup and use core graphics directly to swap buffers rather than going though the overhead of the obj-c calls.

This commit is contained in:
Steve Checkoway
2006-01-21 13:40:01 +00:00
parent 3f5c921357
commit 2dc6a8fa66
@@ -409,8 +409,7 @@ void LowLevelWindow_Cocoa::GetDisplayResolutions( DisplayResolutions &dr ) const
void LowLevelWindow_Cocoa::SwapBuffers() void LowLevelWindow_Cocoa::SwapBuffers()
{ {
// XXX don't use Obj-C here, use CG. CGLFlushDrawable( CGLGetCurrentContext() );
[[NSOpenGLContext currentContext] flushBuffer];
} }
void LowLevelWindow_Cocoa::Update() void LowLevelWindow_Cocoa::Update()
@@ -430,7 +429,6 @@ void LowLevelWindow_Cocoa::Update()
void LowLevelWindow_Cocoa::BeginConcurrentRendering() void LowLevelWindow_Cocoa::BeginConcurrentRendering()
{ {
LOG->Trace( __func__ );
if( m_CurrentParams.windowed ) if( m_CurrentParams.windowed )
[m_BGContext setView:[m_Window contentView]]; [m_BGContext setView:[m_Window contentView]];
else else
@@ -440,7 +438,6 @@ void LowLevelWindow_Cocoa::BeginConcurrentRendering()
void LowLevelWindow_Cocoa::EndConcurrentRendering() void LowLevelWindow_Cocoa::EndConcurrentRendering()
{ {
LOG->Trace( __func__ );
[NSOpenGLContext clearCurrentContext]; [NSOpenGLContext clearCurrentContext];
[m_BGContext clearDrawable]; [m_BGContext clearDrawable];
} }