mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 23:32:28 +00:00
Made sure GL context isn't activated until it's locked.
This commit is contained in:
parent
a546277f88
commit
4c5d66c317
@ -133,8 +133,8 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
|||||||
|
|
||||||
- (void)performWithGLContext:(dispatch_block_t)action
|
- (void)performWithGLContext:(dispatch_block_t)action
|
||||||
{
|
{
|
||||||
[self.openGLContext makeCurrentContext];
|
|
||||||
CGLLockContext([[self openGLContext] CGLContextObj]);
|
CGLLockContext([[self openGLContext] CGLContextObj]);
|
||||||
|
[self.openGLContext makeCurrentContext];
|
||||||
action();
|
action();
|
||||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user