mirror of https://github.com/axmolengine/axmol.git
issue #2129: Re-adds 'CC' prefix to objective-c classes for all projects.
This commit is contained in:
parent
2a715ec3cf
commit
0879a12516
|
@ -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<UITextInputTokenizer> 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;
|
||||
|
|
|
@ -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_)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
@interface AppController : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
@interface AppController : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
@interface AppController : NSObject <NSApplicationDelegate>
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue