mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into scrollview_develop
This commit is contained in:
commit
35f0b07aa6
|
@ -72,7 +72,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
||||||
|
|
||||||
//CLASS INTERFACE:
|
//CLASS INTERFACE:
|
||||||
|
|
||||||
/** EAGLView Class.
|
/** CCEAGLView Class.
|
||||||
* This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
|
* 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.
|
* 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.
|
* 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) id<UITextInputTokenizer> tokenizer;
|
||||||
@property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown;
|
@property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown;
|
||||||
@property(nonatomic, copy) NSNotification* keyboardShowNotification;
|
@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;
|
+ (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;
|
+ (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;
|
+ (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;
|
+ (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
|
// get the view object
|
||||||
+(id) sharedEGLView;
|
+(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
|
- (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;
|
- (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;
|
- (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) */
|
/** 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;
|
@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;
|
-(void) swapBuffers;
|
||||||
|
|
||||||
- (CGRect) convertRectFromViewToSurface:(CGRect)rect;
|
- (CGRect) convertRectFromViewToSurface:(CGRect)rect;
|
||||||
|
|
|
@ -345,7 +345,7 @@ static CCEAGLView *view = 0;
|
||||||
return pFormat;
|
return pFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark EAGLView - Point conversion
|
#pragma mark CCEAGLView - Point conversion
|
||||||
|
|
||||||
- (CGPoint) convertPointFromViewToSurface:(CGPoint)point
|
- (CGPoint) convertPointFromViewToSurface:(CGPoint)point
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ static CCEAGLView *view = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass the touches to the superview
|
// Pass the touches to the superview
|
||||||
#pragma mark EAGLView - Touch Delegate
|
#pragma mark CCEAGLView - Touch Delegate
|
||||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||||
{
|
{
|
||||||
if (isKeyboardShown_)
|
if (isKeyboardShown_)
|
||||||
|
|
|
@ -171,7 +171,7 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||||
CVDisplayLinkSetOutputCallback(displayLink, &MyDisplayLinkCallback, self);
|
CVDisplayLinkSetOutputCallback(displayLink, &MyDisplayLinkCallback, self);
|
||||||
|
|
||||||
// Set the display link for the current renderer
|
// Set the display link for the current renderer
|
||||||
EAGLView *openGLView_ = (EAGLView*)[EAGLView sharedEGLView];
|
CCEAGLView *openGLView_ = (CCEAGLView*)[CCEAGLView sharedEGLView];
|
||||||
CGLContextObj cglContext = (CGLContextObj)[[openGLView_ openGLContext] CGLContextObj];
|
CGLContextObj cglContext = (CGLContextObj)[[openGLView_ openGLContext] CGLContextObj];
|
||||||
CGLPixelFormatObj cglPixelFormat = (CGLPixelFormatObj)[[openGLView_ pixelFormat] CGLPixelFormatObj];
|
CGLPixelFormatObj cglPixelFormat = (CGLPixelFormatObj)[[openGLView_ pixelFormat] CGLPixelFormatObj];
|
||||||
CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat);
|
CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(displayLink, cglContext, cglPixelFormat);
|
||||||
|
|
|
@ -110,7 +110,7 @@ void EGLView::setScissorInPoints(float x , float y , float w , float h)
|
||||||
|
|
||||||
void EGLView::setMultiTouchMask(bool mask)
|
void EGLView::setMultiTouchMask(bool mask)
|
||||||
{
|
{
|
||||||
//EAGLView *glView = [EAGLView sharedEGLView];
|
//CCEAGLView *glView = [CCEAGLView sharedEGLView];
|
||||||
//glView.multipleTouchEnabled = mask ? YES : NO;
|
//glView.multipleTouchEnabled = mask ? YES : NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ static CCEAGLView *view;
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
CCLOGINFO(@"cocos2d: deallocing EAGLView %@", self);
|
CCLOGINFO(@"cocos2d: deallocing CCEAGLView %@", self);
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ static CCEAGLView *view;
|
||||||
waitUntilDone:NO];
|
waitUntilDone:NO];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma mark EAGLView - Mouse events
|
#pragma mark CCEAGLView - Mouse events
|
||||||
|
|
||||||
- (void)mouseDown:(NSEvent *)theEvent
|
- (void)mouseDown:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
|
@ -428,7 +428,7 @@ static CCEAGLView *view;
|
||||||
[super scrollWheel:theEvent];
|
[super scrollWheel:theEvent];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark EAGLView - Key events
|
#pragma mark CCEAGLView - Key events
|
||||||
|
|
||||||
-(BOOL) becomeFirstResponder
|
-(BOOL) becomeFirstResponder
|
||||||
{
|
{
|
||||||
|
@ -466,7 +466,7 @@ static CCEAGLView *view;
|
||||||
DISPATCH_EVENT(theEvent, _cmd);
|
DISPATCH_EVENT(theEvent, _cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark EAGLView - Touch events
|
#pragma mark CCEAGLView - Touch events
|
||||||
- (void)touchesBeganWithEvent:(NSEvent *)theEvent
|
- (void)touchesBeganWithEvent:(NSEvent *)theEvent
|
||||||
{
|
{
|
||||||
DISPATCH_EVENT(theEvent, _cmd);
|
DISPATCH_EVENT(theEvent, _cmd);
|
||||||
|
|
|
@ -232,7 +232,7 @@ EditBoxImplMac::EditBoxImplMac(EditBox* pEditText)
|
||||||
, _anchorPoint(ccp(0.5f, 0.5f))
|
, _anchorPoint(ccp(0.5f, 0.5f))
|
||||||
{
|
{
|
||||||
//! TODO: Retina on Mac
|
//! TODO: Retina on Mac
|
||||||
//! _inRetinaMode = [[EAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false;
|
//! _inRetinaMode = [[CCEAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false;
|
||||||
_inRetinaMode = false;
|
_inRetinaMode = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ static AppDelegate s_sharedApplication;
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
// Init the EAGLView
|
// Init the CCEAGLView
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGB565
|
pixelFormat: kEAGLColorFormatRGB565
|
||||||
depthFormat: GL_DEPTH24_STENCIL8_OES
|
depthFormat: GL_DEPTH24_STENCIL8_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0];
|
numberOfSamples: 0];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling:NO
|
multiSampling:NO
|
||||||
numberOfSamples:0];
|
numberOfSamples:0];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication;
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
// Init the EAGLView
|
// Init the CCEAGLView
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGB565
|
pixelFormat: kEAGLColorFormatRGB565
|
||||||
depthFormat: GL_DEPTH24_STENCIL8_OES
|
depthFormat: GL_DEPTH24_STENCIL8_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -53,7 +53,7 @@ static AppDelegate s_sharedApplication;
|
||||||
numberOfSamples: 0];
|
numberOfSamples: 0];
|
||||||
[__glView setMultipleTouchEnabled:YES];
|
[__glView setMultipleTouchEnabled:YES];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -30,7 +30,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples:0 ];
|
numberOfSamples:0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling:NO
|
multiSampling:NO
|
||||||
numberOfSamples:0];
|
numberOfSamples:0];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
@interface AppController : NSObject <NSApplicationDelegate>
|
@interface AppController : NSObject <NSApplicationDelegate>
|
||||||
{
|
{
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
EAGLView *glView;
|
CCEAGLView *glView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
||||||
@property (nonatomic, assign) IBOutlet EAGLView* glView;
|
@property (nonatomic, assign) IBOutlet CCEAGLView* glView;
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender;
|
-(IBAction) toggleFullScreen:(id)sender;
|
||||||
-(IBAction) exitFullScreen:(id)sender;
|
-(IBAction) exitFullScreen:(id)sender;
|
||||||
|
|
|
@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication;
|
||||||
defer:YES];
|
defer:YES];
|
||||||
|
|
||||||
// allocate our GL view
|
// allocate our GL view
|
||||||
// (isn't there already a shared EAGLView?)
|
// (isn't there already a shared CCEAGLView?)
|
||||||
glView = [[EAGLView alloc] initWithFrame:rect];
|
glView = [[CCEAGLView alloc] initWithFrame:rect];
|
||||||
|
|
||||||
// set window parameters
|
// set window parameters
|
||||||
[window becomeFirstResponder];
|
[window becomeFirstResponder];
|
||||||
|
@ -74,13 +74,13 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender
|
-(IBAction) toggleFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
EAGLView* pView = [EAGLView sharedEGLView];
|
CCEAGLView* pView = [CCEAGLView sharedEGLView];
|
||||||
[pView setFullScreen:!pView.isFullScreen];
|
[pView setFullScreen:!pView.isFullScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction) exitFullScreen:(id)sender
|
-(IBAction) exitFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
[[EAGLView sharedEGLView] setFullScreen:NO];
|
[[CCEAGLView sharedEGLView] setFullScreen:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling:NO
|
multiSampling:NO
|
||||||
numberOfSamples:0];
|
numberOfSamples:0];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
@interface AppController : NSObject <NSApplicationDelegate>
|
@interface AppController : NSObject <NSApplicationDelegate>
|
||||||
{
|
{
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
EAGLView *glView;
|
CCEAGLView *glView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
||||||
@property (nonatomic, assign) IBOutlet EAGLView* glView;
|
@property (nonatomic, assign) IBOutlet CCEAGLView* glView;
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender;
|
-(IBAction) toggleFullScreen:(id)sender;
|
||||||
-(IBAction) exitFullScreen:(id)sender;
|
-(IBAction) exitFullScreen:(id)sender;
|
||||||
|
|
|
@ -43,8 +43,8 @@ static AppDelegate s_sharedApplication;
|
||||||
defer:YES];
|
defer:YES];
|
||||||
|
|
||||||
// allocate our GL view
|
// allocate our GL view
|
||||||
// (isn't there already a shared EAGLView?)
|
// (isn't there already a shared CCEAGLView?)
|
||||||
glView = [[EAGLView alloc] initWithFrame:rect];
|
glView = [[CCEAGLView alloc] initWithFrame:rect];
|
||||||
|
|
||||||
// set window parameters
|
// set window parameters
|
||||||
[window becomeFirstResponder];
|
[window becomeFirstResponder];
|
||||||
|
@ -74,13 +74,13 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender
|
-(IBAction) toggleFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
EAGLView* pView = [EAGLView sharedEGLView];
|
CCEAGLView* pView = [CCEAGLView sharedEGLView];
|
||||||
[pView setFullScreen:!pView.isFullScreen];
|
[pView setFullScreen:!pView.isFullScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction) exitFullScreen:(id)sender
|
-(IBAction) exitFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
[[EAGLView sharedEGLView] setFullScreen:NO];
|
[[CCEAGLView sharedEGLView] setFullScreen:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication;
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
// Init the EAGLView
|
// Init the CCEAGLView
|
||||||
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGB565
|
pixelFormat: kEAGLColorFormatRGB565
|
||||||
depthFormat: GL_DEPTH24_STENCIL8_OES
|
depthFormat: GL_DEPTH24_STENCIL8_OES
|
||||||
|
@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication;
|
||||||
numberOfSamples: 0];
|
numberOfSamples: 0];
|
||||||
[__glView setMultipleTouchEnabled:YES];
|
[__glView setMultipleTouchEnabled:YES];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];
|
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];
|
||||||
|
|
||||||
// allocate our GL view
|
// 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];
|
glView = [[CCEAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat];
|
||||||
|
|
||||||
// set window parameters
|
// set window parameters
|
||||||
|
|
|
@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -37,7 +37,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
[__glView setMultipleTouchEnabled:YES];
|
[__glView setMultipleTouchEnabled:YES];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -27,7 +27,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -35,7 +35,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -51,7 +51,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -19,8 +19,8 @@ static AppDelegate s_sharedApplication;
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
|
|
||||||
// Init the EAGLView
|
// Init the CCEAGLView
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGB565
|
pixelFormat: kEAGLColorFormatRGB565
|
||||||
depthFormat: GL_DEPTH24_STENCIL8_OES
|
depthFormat: GL_DEPTH24_STENCIL8_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -28,7 +28,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples: 0];
|
numberOfSamples: 0];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
@interface AppController : NSObject <NSApplicationDelegate>
|
@interface AppController : NSObject <NSApplicationDelegate>
|
||||||
{
|
{
|
||||||
NSWindow *window;
|
NSWindow *window;
|
||||||
EAGLView *glView;
|
CCEAGLView *glView;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
@property (nonatomic, assign) IBOutlet NSWindow* window;
|
||||||
@property (nonatomic, assign) IBOutlet EAGLView* glView;
|
@property (nonatomic, assign) IBOutlet CCEAGLView* glView;
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender;
|
-(IBAction) toggleFullScreen:(id)sender;
|
||||||
-(IBAction) exitFullScreen:(id)sender;
|
-(IBAction) exitFullScreen:(id)sender;
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];
|
NSOpenGLPixelFormat *pixelFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease];
|
||||||
|
|
||||||
// allocate our GL view
|
// allocate our GL view
|
||||||
// (isn't there already a shared EAGLView?)
|
// (isn't there already a shared CCEAGLView?)
|
||||||
glView = [[EAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat];
|
glView = [[CCEAGLView alloc] initWithFrame:rect pixelFormat:pixelFormat];
|
||||||
|
|
||||||
// set window parameters
|
// set window parameters
|
||||||
[window becomeFirstResponder];
|
[window becomeFirstResponder];
|
||||||
|
@ -81,13 +81,13 @@
|
||||||
|
|
||||||
-(IBAction) toggleFullScreen:(id)sender
|
-(IBAction) toggleFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
EAGLView* pView = [EAGLView sharedEGLView];
|
CCEAGLView* pView = [CCEAGLView sharedEGLView];
|
||||||
[pView setFullScreen:!pView.isFullScreen];
|
[pView setFullScreen:!pView.isFullScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
-(IBAction) exitFullScreen:(id)sender
|
-(IBAction) exitFullScreen:(id)sender
|
||||||
{
|
{
|
||||||
[[EAGLView sharedEGLView] setFullScreen:NO];
|
[[CCEAGLView sharedEGLView] setFullScreen:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -21,7 +21,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
depthFormat: GL_DEPTH_COMPONENT16 //_OES
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -31,7 +31,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
[__glView setMultipleTouchEnabled:YES];
|
[__glView setMultipleTouchEnabled:YES];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -43,7 +43,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -52,7 +52,7 @@ static AppDelegate s_sharedApplication;
|
||||||
numberOfSamples: 0 ];
|
numberOfSamples: 0 ];
|
||||||
|
|
||||||
[__glView setMultipleTouchEnabled:YES];
|
[__glView setMultipleTouchEnabled:YES];
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
|
@ -30,7 +30,7 @@ static AppDelegate s_sharedApplication;
|
||||||
|
|
||||||
// Add the view controller's view to the window and display.
|
// Add the view controller's view to the window and display.
|
||||||
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
|
||||||
EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
|
CCEAGLView *__glView = [CCEAGLView viewWithFrame: [window bounds]
|
||||||
pixelFormat: kEAGLColorFormatRGBA8
|
pixelFormat: kEAGLColorFormatRGBA8
|
||||||
depthFormat: GL_DEPTH_COMPONENT16
|
depthFormat: GL_DEPTH_COMPONENT16
|
||||||
preserveBackbuffer: NO
|
preserveBackbuffer: NO
|
||||||
|
@ -38,7 +38,7 @@ static AppDelegate s_sharedApplication;
|
||||||
multiSampling: NO
|
multiSampling: NO
|
||||||
numberOfSamples:0 ];
|
numberOfSamples:0 ];
|
||||||
|
|
||||||
// Use RootViewController manage EAGLView
|
// Use RootViewController manage CCEAGLView
|
||||||
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
|
||||||
viewController.wantsFullScreenLayout = YES;
|
viewController.wantsFullScreenLayout = YES;
|
||||||
viewController.view = __glView;
|
viewController.view = __glView;
|
||||||
|
|
Loading…
Reference in New Issue