diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm index 2f3bb67234..c107328dae 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm @@ -40,7 +40,7 @@ static const int CC_EDIT_BOX_PADDING = 5; { auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / [[CCEAGLView sharedEGLView] contentScaleFactor ]; + float padding = CC_EDIT_BOX_PADDING * glview->getScaleX() / glview->getContentScaleFactor(); return CGRectMake(bounds.origin.x + padding, bounds.origin.y + padding, bounds.size.width - padding*2, bounds.size.height - padding*2); } @@ -95,8 +95,10 @@ static const int CC_EDIT_BOX_PADDING = 5; -(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance { - id eglView = [CCEAGLView sharedEGLView]; - [eglView doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; } -(void) setPosition:(CGPoint) pos @@ -120,7 +122,10 @@ static const int CC_EDIT_BOX_PADDING = 5; -(void) openKeyboard { - [[CCEAGLView sharedEGLView] addSubview:textField_]; + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview addSubview:textField_]; [textField_ becomeFirstResponder]; } @@ -140,16 +145,21 @@ static const int CC_EDIT_BOX_PADDING = 5; -(void)animationSelector { - id eglView = [CCEAGLView sharedEGLView]; - [eglView doAnimationWhenAnotherEditBeClicked]; + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + [eaglview doAnimationWhenAnotherEditBeClicked]; } - (BOOL)textFieldShouldBeginEditing:(UITextField *)sender // return NO to disallow editing. { CCLOG("textFieldShouldBeginEditing..."); editState_ = YES; - id eglView = [CCEAGLView sharedEGLView]; - if ([eglView isKeyboardShown]) + + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + CCEAGLView *eaglview = (CCEAGLView *) view->getEAGLView(); + + if ([eaglview isKeyboardShown]) { [self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f]; } @@ -264,7 +274,9 @@ EditBoxImplIOS::EditBoxImplIOS(EditBox* pEditText) , _systemControl(NULL) , _maxTextLength(-1) { - _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; + auto view = cocos2d::Director::getInstance()->getOpenGLView(); + + _inRetinaMode = view->isRetinaDisplay(); } EditBoxImplIOS::~EditBoxImplIOS() @@ -535,7 +547,9 @@ void EditBoxImplIOS::setPlaceHolder(const char* pText) static CGPoint convertDesignCoordToScreenCoord(const Point& designCoord, bool bInRetinaMode) { auto glview = cocos2d::Director::getInstance()->getOpenGLView(); - float viewH = (float)[[CCEAGLView sharedEGLView] getHeight]; + CCEAGLView *eaglview = (CCEAGLView *) glview->getEAGLView(); + + float viewH = (float)[eaglview getHeight]; Point visiblePos = Point(designCoord.x * glview->getScaleX(), designCoord.y * glview->getScaleY()); Point screenGLPos = visiblePos + glview->getViewPortRect().origin; diff --git a/samples/test-cpp/Classes/AppDelegate.cpp b/samples/test-cpp/Classes/AppDelegate.cpp index 0d2b7bf2c6..191a05abae 100644 --- a/samples/test-cpp/Classes/AppDelegate.cpp +++ b/samples/test-cpp/Classes/AppDelegate.cpp @@ -1,3 +1,28 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + #include "AppDelegate.h" #include "cocos2d.h" @@ -77,6 +102,7 @@ bool AppDelegate::applicationDidFinishLaunching() fileUtils->setSearchPaths(searchPaths); +// glview->setDesignResolutionSize(screenSize.width, screenSize.height, ResolutionPolicy::NO_BORDER); glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER); auto scene = Scene::create(); diff --git a/samples/test-cpp/Classes/AppDelegate.h b/samples/test-cpp/Classes/AppDelegate.h index 18ee8aeb63..bd170afca7 100644 --- a/samples/test-cpp/Classes/AppDelegate.h +++ b/samples/test-cpp/Classes/AppDelegate.h @@ -1,3 +1,28 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + #ifndef _APP_DELEGATE_H_ #define _APP_DELEGATE_H_ diff --git a/samples/test-cpp/proj.ios/Classes/RootViewController.h b/samples/test-cpp/proj.ios/Classes/RootViewController.h index 1401055c5c..e6b80c0053 100644 --- a/samples/test-cpp/proj.ios/Classes/RootViewController.h +++ b/samples/test-cpp/proj.ios/Classes/RootViewController.h @@ -1,10 +1,27 @@ -// -// RootViewController.h -// test -// -// Created by Walzer on 11-4-28. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #import diff --git a/samples/test-cpp/proj.ios/Classes/RootViewController.mm b/samples/test-cpp/proj.ios/Classes/RootViewController.mm index 137ff450a6..4f697958b3 100644 --- a/samples/test-cpp/proj.ios/Classes/RootViewController.mm +++ b/samples/test-cpp/proj.ios/Classes/RootViewController.mm @@ -1,10 +1,27 @@ - // -// RootViewController.mm -// test -// -// Created by Walzer on 11-4-28. -// Copyright 2011 __MyCompanyName__. All rights reserved. -// +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #import "RootViewController.h" diff --git a/samples/test-cpp/proj.ios/Classes/testsAppDelegate.h b/samples/test-cpp/proj.ios/Classes/testsAppDelegate.h index aeed186767..68c6c38eab 100644 --- a/samples/test-cpp/proj.ios/Classes/testsAppDelegate.h +++ b/samples/test-cpp/proj.ios/Classes/testsAppDelegate.h @@ -1,10 +1,27 @@ -// -// iphoneAppDelegate.h -// iphone -// -// Created by Walzer on 10-11-16. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #import diff --git a/samples/test-cpp/proj.ios/Classes/testsAppDelegate.mm b/samples/test-cpp/proj.ios/Classes/testsAppDelegate.mm index 0be72cad25..15f3c29b98 100644 --- a/samples/test-cpp/proj.ios/Classes/testsAppDelegate.mm +++ b/samples/test-cpp/proj.ios/Classes/testsAppDelegate.mm @@ -1,10 +1,27 @@ -// -// iphoneAppDelegate.m -// iphone -// -// Created by Walzer on 10-11-16. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ #import "testsAppDelegate.h" @@ -32,19 +49,20 @@ static AppDelegate s_sharedApplication; window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; // Init the CCEAGLView - CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] - pixelFormat: kEAGLColorFormatRGB565 - depthFormat: GL_DEPTH24_STENCIL8_OES - preserveBackbuffer: NO - sharegroup: nil - multiSampling: NO - numberOfSamples: 0]; - [__glView setMultipleTouchEnabled:YES]; + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGBA8 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0 ]; + + [eaglView setMultipleTouchEnabled:YES]; // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; - viewController.view = __glView; + viewController.view = eaglView; // Set RootViewController to window if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) @@ -61,7 +79,11 @@ static AppDelegate s_sharedApplication; [window makeKeyAndVisible]; [[UIApplication sharedApplication] setStatusBarHidden:true]; - + + + cocos2d::EGLView *glview = cocos2d::EGLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + app->run(); return YES; diff --git a/samples/test-javascript/proj.ios/AppController.h b/samples/test-javascript/proj.ios/AppController.h index 10287bd13f..2e8186124e 100644 --- a/samples/test-javascript/proj.ios/AppController.h +++ b/samples/test-javascript/proj.ios/AppController.h @@ -1,14 +1,32 @@ -// -// testjsAppController.h -// testjs -// -// Created by Rolando Abarca on 3/19/12. -// Copyright __MyCompanyName__ 2012. All rights reserved. -// +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ @class RootViewController; -@interface AppController : NSObject { +@interface AppController : NSObject +{ UIWindow *window; RootViewController *viewController; } diff --git a/samples/test-javascript/proj.ios/AppController.mm b/samples/test-javascript/proj.ios/AppController.mm index 20fe3778da..be865b7fe3 100644 --- a/samples/test-javascript/proj.ios/AppController.mm +++ b/samples/test-javascript/proj.ios/AppController.mm @@ -1,16 +1,33 @@ -// -// testjsAppController.mm -// testjs -// -// Created by Rolando Abarca on 3/19/12. -// Copyright __MyCompanyName__ 2012. All rights reserved. -// -#import -#import "AppController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" -#import "AppDelegate.h" +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2014 Chukong Technologies Inc. + http://www.cocos2d-x.org + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import +#import "cocos2d.h" + +#import "AppController.h" +#import "AppDelegate.h" #import "RootViewController.h" @implementation AppController @@ -21,13 +38,14 @@ // cocos2d application instance static AppDelegate s_sharedApplication; -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ // Override point for customization after application launch. // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH24_STENCIL8_OES preserveBackbuffer: NO @@ -35,12 +53,15 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - [__glView setMultipleTouchEnabled:YES]; + cocos2d::EGLView *glview = cocos2d::EGLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + [eaglView setMultipleTouchEnabled:YES]; // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; - viewController.view = __glView; + viewController.view = eaglView; // Set RootViewController to window if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) diff --git a/samples/test-lua/proj.ios/AppController.mm b/samples/test-lua/proj.ios/AppController.mm index a572351f25..f0b1fcd2fb 100644 --- a/samples/test-lua/proj.ios/AppController.mm +++ b/samples/test-lua/proj.ios/AppController.mm @@ -43,19 +43,23 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] - pixelFormat: kEAGLColorFormatRGBA8 - depthFormat: GL_DEPTH24_STENCIL8_OES - preserveBackbuffer: NO - sharegroup: nil - multiSampling: NO - numberOfSamples: 0 ]; - [__glView setMultipleTouchEnabled:YES]; + CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] + pixelFormat: kEAGLColorFormatRGBA8 + depthFormat: GL_DEPTH24_STENCIL8_OES + preserveBackbuffer: NO + sharegroup: nil + multiSampling: NO + numberOfSamples: 0 ]; + + cocos2d::EGLView *glview = cocos2d::EGLView::createWithEAGLView(eaglView); + cocos2d::Director::getInstance()->setOpenGLView(glview); + + [eaglView setMultipleTouchEnabled:YES]; // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; - viewController.view = __glView; + viewController.view = eaglView; // Set RootViewController to window if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)