add free and poly selection mask tools, fix some threading gl problems

This commit is contained in:
2017-10-24 14:20:12 +01:00
parent 2a92beca7b
commit b40a5b656b
9 changed files with 197 additions and 137 deletions

View File

@@ -35,7 +35,7 @@ NSThread* lock_thread;
lock_count++;
[EAGLContext setCurrentContext:self.context];
GLKView* view = (GLKView*)self.view;
//[view bindDrawable];
[view bindDrawable];
}
- (void)async_unlock
{
@@ -45,7 +45,7 @@ NSThread* lock_thread;
}
- (void)async_swap
{
[[EAGLContext currentContext] presentRenderbuffer:GL_RENDERBUFFER];
[self.context presentRenderbuffer:GL_RENDERBUFFER];
}
- (void)insertText:(NSString *)text
@@ -317,6 +317,7 @@ NSThread* lock_thread;
[gl_lock lock];
if (!(App::I.redraw || App::I.animate))
{
[self.context presentRenderbuffer:GL_FRAMEBUFFER];
[gl_lock unlock];
return;
}
@@ -324,7 +325,7 @@ NSThread* lock_thread;
[view bindDrawable];
App::I.clear();
App::I.update(0);
//[self.context presentRenderbuffer:GL_FRAMEBUFFER];
[self.context presentRenderbuffer:GL_FRAMEBUFFER];
[gl_lock unlock];
}