I am using CCGLView in cocos2d2.0 to work with cocoa Touch. But my application will crash when I click the home button. An error occurred in the swapBuffers CCGLView method:
if(![_context presentRenderbuffer:GL_RENDERBUFFER]) ------- EXC_BAD_ACCESS
Stack:
5: EAGLContext_presentRenderbuffer (EAGleContext *, objc_selectorr *, unsigned int)
6- [CCGlView swapBuffers]
7- [CCDirectorIOS drawScene]
8- [CCDirectorDisplayLink mainLoop:]
.....
By the way, I pause the director using the delegate method:
- (void)applicationDidEnterBackground:(UIApplication *)application { [[CCDirector sharedDirector] pause]; }
Any ideas? Thanks.
ios iphone cocos2d-iphone
Ah wen
source share