fixed opacity issue in SpriteBatchNode.

This commit is contained in:
Dhilan007 2014-07-08 14:08:53 +08:00
parent 6e2caf1c78
commit e31abe3f54
1 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,10 @@ bool SpriteBatchNode::initWithTexture(Texture2D *tex, ssize_t capacity)
CCASSERT(capacity>=0, "Capacity must be >= 0");
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
if(tex->hasPremultipliedAlpha())
{
_blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED;
}
_textureAtlas = new TextureAtlas();
if (capacity == 0)