vedi
#1
It seems like a bug in CCClippingNode. It does not redraw whole its content when it is on a scaled parent.
As a quick fix I replaced:
ccDrawSolidRect(CCPointZero, ccpFromSize(CCDirector::sharedDirector()->getWinSize()), ccc4f(1, 1, 1, 1));
with:
ccDrawSolidRect(CCPointZero, ccpFromSize(getContentSize()), ccc4f(1, 1, 1, 1));
It works.
You can find details here:
Hey i tried what your said but it does not work for me.
In my case, the parent of CCClippingNode is continuously scaled up n down.
Hey
I found a similar issue but on cocos2d-iphone
https://code.google.com/p/cocos2d-iphone/issues/detail?id=1463
So I made the changes mentioned above i.e.
I added line:
glClear(GL_STENCIL_BUFFER_BIT);
above lines:
// draw a fullscreen solid rectangle to clear the stencil buffer //ccDrawSolidRect(CCPointZero, ccpFromSize([[CCDirector sharedDirector] winSize]), ccc4f(1, 1, 1, 1)); ccDrawSolidRect(CCPointZero, ccpFromSize(CCDirector::sharedDirector()->getWinSize()), ccc4f(1, 1, 1, 1));
It solved the problem for me.