We can update the OpenGL layer binding when we're laying out the views
This commit is contained in:
parent
0cbd7b9850
commit
7f5daddd35
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -145,7 +145,6 @@
|
|||
|
||||
[uiwindow setFrame:frame];
|
||||
[data->view setFrame:frame];
|
||||
[data->view updateFrame];
|
||||
SDL_SendWindowEvent(self->window, SDL_WINDOWEVENT_RESIZED, w, h);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue