diff --git a/cocos2dx/platform/ios/EAGLView.h b/cocos2dx/platform/ios/EAGLView.h index 78868e5ecc..7a8f9c54d8 100755 --- a/cocos2dx/platform/ios/EAGLView.h +++ b/cocos2dx/platform/ios/EAGLView.h @@ -72,7 +72,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. //CLASS INTERFACE: -/** EAGLView Class. +/** CCEAGLView Class. * This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. * The view content is basically an EAGL surface you render your OpenGL scene into. * Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. @@ -110,23 +110,23 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. @property(nonatomic, readonly) id tokenizer; @property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown; @property(nonatomic, copy) NSNotification* keyboardShowNotification; -/** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ +/** creates an initializes an CCEAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ + (id) viewWithFrame:(CGRect)frame; -/** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */ +/** creates an initializes an CCEAGLView with a frame, a color buffer format, and 0-bit depth buffer */ + (id) viewWithFrame:(CGRect)frame pixelFormat:(NSString*)format; -/** creates an initializes an EAGLView with a frame, a color buffer format, and a depth buffer format */ +/** creates an initializes an CCEAGLView with a frame, a color buffer format, and a depth buffer format */ + (id) viewWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GLuint)depth; -/** creates an initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping */ +/** creates an initializes an CCEAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup, and multisamping */ + (id) viewWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained sharegroup:(EAGLSharegroup*)sharegroup multiSampling:(BOOL)multisampling numberOfSamples:(unsigned int)samples; // get the view object +(id) sharedEGLView; -/** Initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ +/** Initializes an CCEAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */ - (id) initWithFrame:(CGRect)frame; //These also set the current context -/** Initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */ +/** Initializes an CCEAGLView with a frame, a color buffer format, and 0-bit depth buffer */ - (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format; -/** Initializes an EAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support */ +/** Initializes an CCEAGLView with a frame, a color buffer format, a depth buffer format, a sharegroup and multisampling support */ - (id) initWithFrame:(CGRect)frame pixelFormat:(NSString*)format depthFormat:(GLuint)depth preserveBackbuffer:(BOOL)retained sharegroup:(EAGLSharegroup*)sharegroup multiSampling:(BOOL)sampling numberOfSamples:(unsigned int)nSamples; /** pixel format: it could be RGBA8 (32-bit) or RGB565 (16-bit) */ @@ -143,7 +143,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved. @property(nonatomic,readwrite) BOOL multiSampling; -/** EAGLView uses double-buffer. This method swaps the buffers */ +/** CCEAGLView uses double-buffer. This method swaps the buffers */ -(void) swapBuffers; - (CGRect) convertRectFromViewToSurface:(CGRect)rect; diff --git a/cocos2dx/platform/ios/EAGLView.mm b/cocos2dx/platform/ios/EAGLView.mm index 485f840fda..71b6d7370d 100644 --- a/cocos2dx/platform/ios/EAGLView.mm +++ b/cocos2dx/platform/ios/EAGLView.mm @@ -345,7 +345,7 @@ static CCEAGLView *view = 0; return pFormat; } -#pragma mark EAGLView - Point conversion +#pragma mark CCEAGLView - Point conversion - (CGPoint) convertPointFromViewToSurface:(CGPoint)point { @@ -390,7 +390,7 @@ static CCEAGLView *view = 0; } // Pass the touches to the superview -#pragma mark EAGLView - Touch Delegate +#pragma mark CCEAGLView - Touch Delegate - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if (isKeyboardShown_) diff --git a/cocos2dx/platform/mac/CCDirectorCaller.mm b/cocos2dx/platform/mac/CCDirectorCaller.mm index 4270bf0861..4137f21ada 100644 --- a/cocos2dx/platform/mac/CCDirectorCaller.mm +++ b/cocos2dx/platform/mac/CCDirectorCaller.mm @@ -171,7 +171,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime CVDisplayLinkSetOutputCallback(displayLink, &MyDisplayLinkCallback, self); // Set the display link for the current renderer - EAGLView *openGLView_ = (EAGLView*)[EAGLView sharedEGLView]; + CCEAGLView *openGLView_ = (CCEAGLView*)[CCEAGLView sharedEGLView]; CGLContextObj cglContext = (CGLContextObj)[[openGLView_ openGLContext] CGLContextObj]; CGLPixelFormatObj cglPixelFormat = (CGLPixelFormatObj)[[openGLView_ pixelFormat] CGLPixelFormatObj]; CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat); diff --git a/cocos2dx/platform/mac/CCEGLView.mm b/cocos2dx/platform/mac/CCEGLView.mm index 5a86cde2e6..6bd47fe17c 100644 --- a/cocos2dx/platform/mac/CCEGLView.mm +++ b/cocos2dx/platform/mac/CCEGLView.mm @@ -110,7 +110,7 @@ void EGLView::setScissorInPoints(float x , float y , float w , float h) void EGLView::setMultiTouchMask(bool mask) { - //EAGLView *glView = [EAGLView sharedEGLView]; + //CCEAGLView *glView = [CCEAGLView sharedEGLView]; //glView.multipleTouchEnabled = mask ? YES : NO; } diff --git a/cocos2dx/platform/mac/EAGLView.mm b/cocos2dx/platform/mac/EAGLView.mm index 2eaf4b95af..16dcc98c66 100644 --- a/cocos2dx/platform/mac/EAGLView.mm +++ b/cocos2dx/platform/mac/EAGLView.mm @@ -201,7 +201,7 @@ static CCEAGLView *view; - (void) dealloc { - CCLOGINFO(@"cocos2d: deallocing EAGLView %@", self); + CCLOGINFO(@"cocos2d: deallocing CCEAGLView %@", self); [super dealloc]; } @@ -317,7 +317,7 @@ static CCEAGLView *view; waitUntilDone:NO]; #endif -#pragma mark EAGLView - Mouse events +#pragma mark CCEAGLView - Mouse events - (void)mouseDown:(NSEvent *)theEvent { @@ -428,7 +428,7 @@ static CCEAGLView *view; [super scrollWheel:theEvent]; } -#pragma mark EAGLView - Key events +#pragma mark CCEAGLView - Key events -(BOOL) becomeFirstResponder { @@ -466,7 +466,7 @@ static CCEAGLView *view; DISPATCH_EVENT(theEvent, _cmd); } -#pragma mark EAGLView - Touch events +#pragma mark CCEAGLView - Touch events - (void)touchesBeganWithEvent:(NSEvent *)theEvent { DISPATCH_EVENT(theEvent, _cmd); diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index e693532402..3a89ac6af4 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -232,7 +232,7 @@ EditBoxImplMac::EditBoxImplMac(EditBox* pEditText) , _anchorPoint(ccp(0.5f, 0.5f)) { //! TODO: Retina on Mac - //! _inRetinaMode = [[EAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; + //! _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; _inRetinaMode = false; } diff --git a/plugin/samples/HelloAds/proj.ios/AppController.mm b/plugin/samples/HelloAds/proj.ios/AppController.mm index 62b5a76720..211a0d12ac 100644 --- a/plugin/samples/HelloAds/proj.ios/AppController.mm +++ b/plugin/samples/HelloAds/proj.ios/AppController.mm @@ -19,8 +19,8 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - // Init the EAGLView - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + // Init the CCEAGLView + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGB565 depthFormat: GL_DEPTH24_STENCIL8_OES preserveBackbuffer: NO @@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/plugin/samples/HelloAnalytics/proj.ios/AppController.mm b/plugin/samples/HelloAnalytics/proj.ios/AppController.mm index 2d4ddda4d8..9ce66c9aa1 100644 --- a/plugin/samples/HelloAnalytics/proj.ios/AppController.mm +++ b/plugin/samples/HelloAnalytics/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication; multiSampling:NO numberOfSamples:0]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/plugin/samples/HelloSocial/proj.ios/AppController.mm b/plugin/samples/HelloSocial/proj.ios/AppController.mm index 8a6ee04614..e7dece6458 100644 --- a/plugin/samples/HelloSocial/proj.ios/AppController.mm +++ b/plugin/samples/HelloSocial/proj.ios/AppController.mm @@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - // Init the EAGLView - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + // Init the CCEAGLView + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGB565 depthFormat: GL_DEPTH24_STENCIL8_OES preserveBackbuffer: NO @@ -53,7 +53,7 @@ static AppDelegate s_sharedApplication; numberOfSamples: 0]; [__glView setMultipleTouchEnabled:YES]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Cpp/AssetsManagerTest/proj.ios/AppController.mm b/samples/Cpp/AssetsManagerTest/proj.ios/AppController.mm index e4c9cc33a2..1d74380f5c 100644 --- a/samples/Cpp/AssetsManagerTest/proj.ios/AppController.mm +++ b/samples/Cpp/AssetsManagerTest/proj.ios/AppController.mm @@ -30,7 +30,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples:0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Cpp/HelloCpp/proj.ios/AppController.mm b/samples/Cpp/HelloCpp/proj.ios/AppController.mm index 2d4ddda4d8..9ce66c9aa1 100644 --- a/samples/Cpp/HelloCpp/proj.ios/AppController.mm +++ b/samples/Cpp/HelloCpp/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication; multiSampling:NO numberOfSamples:0]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Cpp/HelloCpp/proj.mac/AppController.h b/samples/Cpp/HelloCpp/proj.mac/AppController.h index d671ffdc23..96c717304b 100644 --- a/samples/Cpp/HelloCpp/proj.mac/AppController.h +++ b/samples/Cpp/HelloCpp/proj.mac/AppController.h @@ -30,11 +30,11 @@ @interface AppController : NSObject { NSWindow *window; - EAGLView *glView; + CCEAGLView *glView; } @property (nonatomic, assign) IBOutlet NSWindow* window; - @property (nonatomic, assign) IBOutlet EAGLView* glView; + @property (nonatomic, assign) IBOutlet CCEAGLView* glView; -(IBAction) toggleFullScreen:(id)sender; -(IBAction) exitFullScreen:(id)sender; diff --git a/samples/Cpp/HelloCpp/proj.mac/AppController.mm b/samples/Cpp/HelloCpp/proj.mac/AppController.mm index d1296ada8b..c023936b1b 100644 --- a/samples/Cpp/HelloCpp/proj.mac/AppController.mm +++ b/samples/Cpp/HelloCpp/proj.mac/AppController.mm @@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication; defer:YES]; // allocate our GL view - // (isn't there already a shared EAGLView?) - glView = [[EAGLView alloc] initWithFrame:rect]; + // (isn't there already a shared CCEAGLView?) + glView = [[CCEAGLView alloc] initWithFrame:rect]; // set window parameters [window becomeFirstResponder]; @@ -74,13 +74,13 @@ static AppDelegate s_sharedApplication; -(IBAction) toggleFullScreen:(id)sender { - EAGLView* pView = [EAGLView sharedEGLView]; + CCEAGLView* pView = [CCEAGLView sharedEGLView]; [pView setFullScreen:!pView.isFullScreen]; } -(IBAction) exitFullScreen:(id)sender { - [[EAGLView sharedEGLView] setFullScreen:NO]; + [[CCEAGLView sharedEGLView] setFullScreen:NO]; } @end diff --git a/samples/Cpp/SimpleGame/proj.ios/AppController.mm b/samples/Cpp/SimpleGame/proj.ios/AppController.mm index 2d4ddda4d8..9ce66c9aa1 100644 --- a/samples/Cpp/SimpleGame/proj.ios/AppController.mm +++ b/samples/Cpp/SimpleGame/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication; multiSampling:NO numberOfSamples:0]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Cpp/SimpleGame/proj.mac/AppController.h b/samples/Cpp/SimpleGame/proj.mac/AppController.h index d671ffdc23..96c717304b 100644 --- a/samples/Cpp/SimpleGame/proj.mac/AppController.h +++ b/samples/Cpp/SimpleGame/proj.mac/AppController.h @@ -30,11 +30,11 @@ @interface AppController : NSObject { NSWindow *window; - EAGLView *glView; + CCEAGLView *glView; } @property (nonatomic, assign) IBOutlet NSWindow* window; - @property (nonatomic, assign) IBOutlet EAGLView* glView; + @property (nonatomic, assign) IBOutlet CCEAGLView* glView; -(IBAction) toggleFullScreen:(id)sender; -(IBAction) exitFullScreen:(id)sender; diff --git a/samples/Cpp/SimpleGame/proj.mac/AppController.mm b/samples/Cpp/SimpleGame/proj.mac/AppController.mm index 1548ee4499..252cfacba2 100644 --- a/samples/Cpp/SimpleGame/proj.mac/AppController.mm +++ b/samples/Cpp/SimpleGame/proj.mac/AppController.mm @@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication; defer:YES]; // allocate our GL view - // (isn't there already a shared EAGLView?) - glView = [[EAGLView alloc] initWithFrame:rect]; + // (isn't there already a shared CCEAGLView?) + glView = [[CCEAGLView alloc] initWithFrame:rect]; // set window parameters [window becomeFirstResponder]; @@ -74,13 +74,13 @@ static AppDelegate s_sharedApplication; -(IBAction) toggleFullScreen:(id)sender { - EAGLView* pView = [EAGLView sharedEGLView]; + CCEAGLView* pView = [CCEAGLView sharedEGLView]; [pView setFullScreen:!pView.isFullScreen]; } -(IBAction) exitFullScreen:(id)sender { - [[EAGLView sharedEGLView] setFullScreen:NO]; + [[CCEAGLView sharedEGLView] setFullScreen:NO]; } @end diff --git a/samples/Cpp/TestCpp/proj.ios/Classes/testsAppDelegate.mm b/samples/Cpp/TestCpp/proj.ios/Classes/testsAppDelegate.mm index 6ffb561bd5..b6ce872bba 100644 --- a/samples/Cpp/TestCpp/proj.ios/Classes/testsAppDelegate.mm +++ b/samples/Cpp/TestCpp/proj.ios/Classes/testsAppDelegate.mm @@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - // Init the EAGLView + // Init the CCEAGLView CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGB565 depthFormat: GL_DEPTH24_STENCIL8_OES @@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication; numberOfSamples: 0]; [__glView setMultipleTouchEnabled:YES]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Cpp/TestCpp/proj.mac/AppController.mm b/samples/Cpp/TestCpp/proj.mac/AppController.mm index e02da4978a..0d30617caa 100644 --- a/samples/Cpp/TestCpp/proj.mac/AppController.mm +++ b/samples/Cpp/TestCpp/proj.mac/AppController.mm @@ -52,7 +52,7 @@ NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease]; // allocate our GL view - // (isn't there already a shared EAGLView?) + // (isn't there already a shared CCEAGLView?) glView = [[CCEAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat]; // set window parameters diff --git a/samples/Javascript/CocosDragonJS/proj.ios/AppController.mm b/samples/Javascript/CocosDragonJS/proj.ios/AppController.mm index ad88c2e329..38bdbfaf8f 100644 --- a/samples/Javascript/CocosDragonJS/proj.ios/AppController.mm +++ b/samples/Javascript/CocosDragonJS/proj.ios/AppController.mm @@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Javascript/CrystalCraze/proj.ios/AppController.mm b/samples/Javascript/CrystalCraze/proj.ios/AppController.mm index ad88c2e329..38bdbfaf8f 100644 --- a/samples/Javascript/CrystalCraze/proj.ios/AppController.mm +++ b/samples/Javascript/CrystalCraze/proj.ios/AppController.mm @@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Javascript/MoonWarriors/proj.ios/AppController.mm b/samples/Javascript/MoonWarriors/proj.ios/AppController.mm index ad88c2e329..38bdbfaf8f 100644 --- a/samples/Javascript/MoonWarriors/proj.ios/AppController.mm +++ b/samples/Javascript/MoonWarriors/proj.ios/AppController.mm @@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Javascript/TestJavascript/proj.ios/AppController.mm b/samples/Javascript/TestJavascript/proj.ios/AppController.mm index f66bb2e3f4..41f78f3ee3 100644 --- a/samples/Javascript/TestJavascript/proj.ios/AppController.mm +++ b/samples/Javascript/TestJavascript/proj.ios/AppController.mm @@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -37,7 +37,7 @@ static AppDelegate s_sharedApplication; [__glView setMultipleTouchEnabled:YES]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Javascript/WatermelonWithMe/proj.ios/AppController.mm b/samples/Javascript/WatermelonWithMe/proj.ios/AppController.mm index ad88c2e329..38bdbfaf8f 100644 --- a/samples/Javascript/WatermelonWithMe/proj.ios/AppController.mm +++ b/samples/Javascript/WatermelonWithMe/proj.ios/AppController.mm @@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Lua/HelloLua/proj.ios/AppController.mm b/samples/Lua/HelloLua/proj.ios/AppController.mm index 19fb889f17..833386e94c 100644 --- a/samples/Lua/HelloLua/proj.ios/AppController.mm +++ b/samples/Lua/HelloLua/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/samples/Lua/TestLua/proj.ios/AppController.mm b/samples/Lua/TestLua/proj.ios/AppController.mm index b00d20b442..eabd8759f0 100644 --- a/samples/Lua/TestLua/proj.ios/AppController.mm +++ b/samples/Lua/TestLua/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/template/multi-platform-cpp/proj.ios/AppController.mm b/template/multi-platform-cpp/proj.ios/AppController.mm index 62b5a76720..211a0d12ac 100644 --- a/template/multi-platform-cpp/proj.ios/AppController.mm +++ b/template/multi-platform-cpp/proj.ios/AppController.mm @@ -19,8 +19,8 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - // Init the EAGLView - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + // Init the CCEAGLView + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGB565 depthFormat: GL_DEPTH24_STENCIL8_OES preserveBackbuffer: NO @@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples: 0]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/template/multi-platform-cpp/proj.mac/AppController.h b/template/multi-platform-cpp/proj.mac/AppController.h index d671ffdc23..96c717304b 100644 --- a/template/multi-platform-cpp/proj.mac/AppController.h +++ b/template/multi-platform-cpp/proj.mac/AppController.h @@ -30,11 +30,11 @@ @interface AppController : NSObject { NSWindow *window; - EAGLView *glView; + CCEAGLView *glView; } @property (nonatomic, assign) IBOutlet NSWindow* window; - @property (nonatomic, assign) IBOutlet EAGLView* glView; + @property (nonatomic, assign) IBOutlet CCEAGLView* glView; -(IBAction) toggleFullScreen:(id)sender; -(IBAction) exitFullScreen:(id)sender; diff --git a/template/multi-platform-cpp/proj.mac/AppController.mm b/template/multi-platform-cpp/proj.mac/AppController.mm index b3571d448a..629c985677 100644 --- a/template/multi-platform-cpp/proj.mac/AppController.mm +++ b/template/multi-platform-cpp/proj.mac/AppController.mm @@ -52,8 +52,8 @@ NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease]; // allocate our GL view - // (isn't there already a shared EAGLView?) - glView = [[EAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat]; + // (isn't there already a shared CCEAGLView?) + glView = [[CCEAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat]; // set window parameters [window becomeFirstResponder]; @@ -81,13 +81,13 @@ -(IBAction) toggleFullScreen:(id)sender { - EAGLView* pView = [EAGLView sharedEGLView]; + CCEAGLView* pView = [CCEAGLView sharedEGLView]; [pView setFullScreen:!pView.isFullScreen]; } -(IBAction) exitFullScreen:(id)sender { - [[EAGLView sharedEGLView] setFullScreen:NO]; + [[CCEAGLView sharedEGLView] setFullScreen:NO]; } @end diff --git a/template/multi-platform-js/proj.ios/AppController.mm b/template/multi-platform-js/proj.ios/AppController.mm index d68a3aac97..4784898308 100644 --- a/template/multi-platform-js/proj.ios/AppController.mm +++ b/template/multi-platform-js/proj.ios/AppController.mm @@ -21,7 +21,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 //_OES preserveBackbuffer: NO @@ -31,7 +31,7 @@ static AppDelegate s_sharedApplication; [__glView setMultipleTouchEnabled:YES]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/template/multi-platform-lua/proj.ios/AppController.mm b/template/multi-platform-lua/proj.ios/AppController.mm index 7d73c18365..17f4a638ee 100644 --- a/template/multi-platform-lua/proj.ios/AppController.mm +++ b/template/multi-platform-lua/proj.ios/AppController.mm @@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -52,7 +52,7 @@ static AppDelegate s_sharedApplication; numberOfSamples: 0 ]; [__glView setMultipleTouchEnabled:YES]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView; diff --git a/template/xcode4/base_ios.xctemplate/ios/AppController.mm b/template/xcode4/base_ios.xctemplate/ios/AppController.mm index 7b2c2a99f0..667c4dd91d 100644 --- a/template/xcode4/base_ios.xctemplate/ios/AppController.mm +++ b/template/xcode4/base_ios.xctemplate/ios/AppController.mm @@ -30,7 +30,7 @@ static AppDelegate s_sharedApplication; // Add the view controller's view to the window and display. window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] + CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO @@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication; multiSampling: NO numberOfSamples:0 ]; - // Use RootViewController manage EAGLView + // Use RootViewController manage CCEAGLView viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; viewController.wantsFullScreenLayout = YES; viewController.view = __glView;