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