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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user