Resize off-screen window after resizing the framebuffer

master
Graham 5 years ago
parent 293a37c593
commit 9b7086f3a5
  1. 4
      gl-natives/src/main/c/jaggl.c

@ -295,6 +295,10 @@ static void *jaggl_proc_addr(const char *name) {
if (width != framebuffer_width || height != framebuffer_height) { if (width != framebuffer_width || height != framebuffer_height) {
[self deleteFramebuffer]; [self deleteFramebuffer];
[self genFramebuffer]; [self genFramebuffer];
jaggl_view.frame = NSMakeRect(0, 0, width, height);
[jaggl_window setFrame:[jaggl_window frameRectForContentRect:jaggl_view.frame] display:YES];
[jaggl_context_appkit update];
} }
glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, framebuffer); glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, framebuffer);

Loading…
Cancel
Save