ios8cocos2d-xcocos2d-x-2.x

CCClippingNode not working in iOS 8


I just realised CCClippingNode (cocos2dx v2.2.6) doesn't work on iOS 8 devices. Does anyone encountered this and manage to solve it? I don't want to upgrade my cocos2dx to v3.x because I worry it might cause more issues. Please need help!

I think the issue happens in Stencil setting but I just couldn't get it fixed.

FYI: I'm using GL_DEPTH24_SENTCIL8_OES and it works on iOS 7 and below devices.

EAGLView *__glView = [EAGLView viewWithFrame: [window bounds]
                                        pixelFormat: kEAGLColorFormatRGBA8
                                        depthFormat: GL_DEPTH24_STENCIL8_OES
                                        preserveBackbuffer: NO
                                        sharegroup:nil
                                        multiSampling:NO
                                        numberOfSamples:0];

Solution

  • I found a fix for my issue... Hopefully it helps other who's facing this problems

    http://discuss.cocos2d-x.org/t/ccclippingnode-will-raise-error-stencil-buffer-is-not-enabled-when-your-apps-first-draw-use-ccclippingnode/17184