DNESS / cocos2d-iphone

Automatically exported from code.google.com/p/cocos2d-iphone
1 stars 0 forks source link

CCGLView autorotation fails with multisampling + depth buffer under cocos2d 2.x #1484

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. See forum posting at http://www.cocos2d-iphone.org/forum/topic/305295
2. or see description below
3.

What is the expected output? What do you see instead?
In cocos2d 2.x, combining multisampling and depth testing causes GL errors in 
CCES2Renderer resizeFromLayer: when rotating between portrait and landscape. 
The rotation fails, the screen goes blank, and numerous errors are logged.

What cocos2d version are you using ?
2.0 or 2.1. This issue does not occur in cocos2d 1.x

What iOS / Mac SDK are you using ?
iOS 5.1 or iOS 6.0

Debug or Release ?
Debug

Which target device / target OS are you using ?
iPad Mini / iOS6

iOS only: Does this happens on device ? or on the simulator ? or on both ?
Device - haven't checked simulator

Mac only: x86 or i386 ?

Please provide any additional information below.

See forum posting at http://www.cocos2d-iphone.org/forum/topic/305295

To reproduce, in Hello, World AppDelegate.m set up the following:
In AppController application:didFinishLaunchingWithOptions::
CCGLView *glView = [CCGLView viewWithFrame:[window_ bounds]
                               pixelFormat:kEAGLColorFormatRGB565
                               depthFormat:GL_DEPTH_COMPONENT16   // (or any other non-zero format)
                        preserveBackbuffer:NO
                                sharegroup:nil
                             multiSampling:YES
                           numberOfSamples:4];
In MyNavigationController supportedInterfaceOrientations (under iOS 6):
-(NSUInteger)supportedInterfaceOrientations { return 
UIInterfaceOrientationMaskAll; }
When attempting to rotate from portrait to landscape, the result is a blank 
screen and a logged error Failed to make complete framebuffer object 0x8CD9 
generated from within CCES2Renderer resizeFromLayer:, followed by a large 
number of OpenGL error 0x0506 errors generated by drawing calls.

This does not occur under cocos2d 1.x.

Original issue reported on code.google.com by wdholli...@gmail.com on 19 Apr 2013 at 6:16