Adds size/orientation support
This commit is contained in:
parent
1b674f891e
commit
1ef23adcb9
1 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,7 @@
|
|||
self.preferredFramesPerSecond = 60;
|
||||
|
||||
[self setupGL];
|
||||
game.windowSize = self.view.bounds.size;
|
||||
}
|
||||
|
||||
- (void)dealloc{
|
||||
|
@ -64,6 +65,10 @@
|
|||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
|
||||
game.windowSize = self.view.bounds.size;
|
||||
}
|
||||
|
||||
- (void)setupGL{
|
||||
[EAGLContext setCurrentContext:self.context];
|
||||
game = [[Game alloc] init];
|
||||
|
|
Reference in a new issue