1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Made sure GL context isn't activated until it's locked.

This commit is contained in:
Thomas Harte 2016-03-19 22:54:56 -04:00
parent a546277f88
commit 4c5d66c317

View File

@ -133,8 +133,8 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
- (void)performWithGLContext:(dispatch_block_t)action
{
[self.openGLContext makeCurrentContext];
CGLLockContext([[self openGLContext] CGLContextObj]);
[self.openGLContext makeCurrentContext];
action();
CGLUnlockContext([[self openGLContext] CGLContextObj]);
}