mirror of https://github.com/axmolengine/axmol.git
fixed opacity issue in SpriteBatchNode.
This commit is contained in:
parent
6e2caf1c78
commit
e31abe3f54
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue