Hi,
I am new to cocos2d and wondering how to render sprite with tranparency? thanks a lot!
I am rendering with default setting of CCSprite, in jpg file used by CCSprite, alpha channel is set as 0 for the part i need it to be invisible. But I still see the whole picture displayed.
the blend function is also set as:
ccBlendFunc blendFunc = {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA};
m_Sprite->setBlendFunc(blendFunc);
ok i figure out that i have to save the 256 color png to be able to make part of picture transparent.
As I see cocos2d is currently supporting jpg/jpeg, pvr, png format. I think there is no alpha channel in jpg/jpeg and am confused by a comment in code: // Issue #886: TEMPORARY FIX FOR TRANSPARENT JPEGS IN IOS4. ?
And to color with rgba8, should we then use pvr format?
Help will be appreciated.
ok i figure out that i have to save the 256 color png to be able to make part of picture transparent.
As I see cocos2d is currently supporting jpg/jpeg, pvr, png format. I think there is no alpha channel in jpg/jpeg and am confused by a comment in code: // Issue #886: TEMPORARY FIX FOR TRANSPARENT JPEGS IN IOS4. ?
And to color with rgba8, should we then use pvr format?
Help will be appreciated.