diff --git a/GLEssentials/iOS/ViewController.m b/GLEssentials/iOS/ViewController.m index b8c4d71..fce3725 100644 --- a/GLEssentials/iOS/ViewController.m +++ b/GLEssentials/iOS/ViewController.m @@ -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];