I am trying to apply a Twirl action on a Sprite. The sprite is a PNG image with transparency. I can get the twirl works however, the entire screen is black except for the one sprite. Do transparency not work with grid actions? Using 0.7.3.
Grid Action with transparency
(5 posts) (2 voices)-
Posted 2 years ago #
-
I'm at a lost as to what's causing this. I thought it might be the blend function but why would everything in the background appear black? Wouldn't I see just black where the grid is drawn?
Posted 2 years ago # -
See the
EffectsAdvancedTest.mfile.
It initializes cocos2d with a pixel format of RGBA8888.
// Use this pixel format to have transparent buffers // BUG: glClearColor() in FBO needs to be converted to RGB565 [[Director sharedDirector] setPixelFormat:kRGBA8];Could you add this "tip" here:
http://www.cocos2d-iphone.org/wiki/doku.php/tips_and_tricks
?
thanks,Posted 2 years ago # -
Thanks riq.
Looks like this tip is already on the wiki. My problem as it turned out, is combination of having 2D projection on at the same time as not having pixel format of RGBA8888. Turned off 2d projection and got the black grid on top of my background which is what I expected. Added RGBA8888 and problem solved. Now, there's still the issue of why I had 2d projection on which was to get rid of a black seem between moving adjacent AtlasSprites.
Posted 2 years ago # -
After further reading on the wiki:
Turning off anti-aliasing for the particular texture I had problem with fixed the black seam problem.
[Texture2D saveTexParameters];
[Texture2D setAliasTexParameters];Thanks again for your help.
Posted 2 years ago #
Reply
You must log in to post.