add context set before init for lua

pull/415/head
Li Linfeng 2019-09-22 13:38:26 +08:00
parent f6c00a958a
commit 76132b1808
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,7 @@ NSString* fatalErrorMessage;
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[[glView openGLContext] makeCurrentContext];
#ifdef DEBUG
NSDate *t = [NSDate date];
#endif
@ -209,6 +210,7 @@ NSString* fatalErrorMessage;
[startupCondition lock];
[startupCondition unlockWithCondition:1];
}
[NSOpenGLContext clearCurrentContext];
[pool release];
return result;