Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
We can update the OpenGL layer binding when we're laying out the views
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 18, 2012
1 parent bfda557 commit 6c3215c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/video/uikit/SDL_uikitopenglview.m
Expand Up @@ -121,7 +121,8 @@ - (id)initWithFrame:(CGRect)frame
}
/* 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;
}
Expand Down Expand Up @@ -198,6 +199,7 @@ - (void)swapBuffers
- (void)layoutSubviews
{
[EAGLContext setCurrentContext:context];
[self updateFrame];
}

- (void)destroyFramebuffer
Expand Down
1 change: 0 additions & 1 deletion src/video/uikit/SDL_uikitviewcontroller.m
Expand Up @@ -145,7 +145,6 @@ - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceO

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

Expand Down

0 comments on commit 6c3215c

Please sign in to comment.