Make releaseCGLContext a no-op

It is sometimes called after the context is destroyed. Attempting to call any
gl* functions in this case causes a segfault.
bzip2
Graham 5 years ago
parent 9b7086f3a5
commit 5e18198ae4
  1. 14
      gl-natives/src/main/c/jaggl.c

@ -327,11 +327,15 @@ static void *jaggl_proc_addr(const char *name) {
}
- (void)releaseCGLContext:(CGLContextObj)context {
CGLSetCurrentContext(context);
[lock lock];
[self deleteFramebuffer];
[lock unlock];
CGLClearDrawable(context);
/*
* Ideally we'd delete the framebuffer/renderbuffers here, if they exist.
* However, releaseCGLContext sometimes ends up being called after we
* destroy the jaggl_onscreen_context, so attempting to call any gl*
* functions here causes a segfault.
*
* Hopefully deleting the context will free up the
* framebuffer/renderbuffers implicitly.
*/
}
@end
#endif

Loading…
Cancel
Save