Reputation: 9277
I just upgraded to Xcode 4.5 / iOS6, and my Cocos2d game now has an issue with transparency on CCLayerColor and CCLayerGradient. Layers created with these subclasses appear to be all-white and opaque, when in fact they should be white with transparency.
ccColor4B topStartColor = ccc4(255, 255, 255, 150);
ccColor4B topEndColor = ccc4(255, 255, 255, 100);
CGPoint topVector = ccp(0, 1);
_topGradient = [CCLayerGradient layerWithColor:topStartColor
fadingTo:topEndColor
alongVector:topVector];
I am on Cocos2d 2.0 Beta2. I did have to rework my AppDelegate to deal with the screen rotation issues caused by iOS6, so it is possible I may have inadvertently forgotten to set something up correctly - though I have combed through it pretty carefully. I should add that sprites with alpha are working fine - it seems to be CCLayerColor and CCLayerGradient only. I tested CCLayerColor in a stock Cocos2d 2.0 project, and it seems to work correctly there, so it's something in my app - but I cannot figure out what's different about my project.
Upvotes: 1
Views: 525
Reputation: 9277
This was in fact a bug in Cocos2d 2.0 Beta 2, and has been fixed in the development branch.
Upvotes: 1