Reduce the amount of time the framebuffer lock is held for

master
Graham 4 years ago
parent 37efde58ef
commit 0a20f4954c
  1. 4
      gl-natives/src/main/c/jaggl.c

@ -343,11 +343,11 @@ static void *jaggl_proc_addr(const char *name) {
return;
}
[lock lock];
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
[lock lock];
if (framebuffer) {
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, framebuffer);
glBlitFramebufferEXT(0, 0, framebuffer_width, framebuffer_height, 0, 0, framebuffer_width, framebuffer_height, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);

Loading…
Cancel
Save