We can update the OpenGL layer binding when we're laying out the views

This commit is contained in:
Sam Lantinga
2012-09-18 00:50:41 -07:00
parent 964b8f3506
commit d7e3a86e68
2 changed files with 3 additions and 2 deletions

View File

@@ -121,7 +121,8 @@
}
/* end create buffers */
self.autoresizingMask = 0; // don't allow autoresize, since we need to do some magic in -(void)updateFrame.
self.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
self.autoresizesSubviews = YES;
}
return self;
}
@@ -198,6 +199,7 @@
- (void)layoutSubviews
{
[EAGLContext setCurrentContext:context];
[self updateFrame];
}
- (void)destroyFramebuffer

View File

@@ -145,7 +145,6 @@
[uiwindow setFrame:frame];
[data->view setFrame:frame];
[data->view updateFrame];
SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
}