MCPcopy Create free account
hub / github.com/axmolengine/axmol / updateBlendFunc

Method updateBlendFunc

core/2d/SpriteBatchNode.cpp:671–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671void SpriteBatchNode::updateBlendFunc()
672{
673 if (!_textureAtlas->getTexture()->hasPremultipliedAlpha())
674 {
675 _blendFunc = BlendFunc::ALPHA_NON_PREMULTIPLIED;
676 setOpacityModifyRGB(false);
677 }
678 else
679 {
680 _blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
681 setOpacityModifyRGB(true);
682 }
683}
684
685// CocosNodeTexture protocol
686void SpriteBatchNode::setBlendFunc(const BlendFunc& blendFunc)

Callers

nothing calls this directly

Calls 3

setOpacityModifyRGBFunction · 0.85
hasPremultipliedAlphaMethod · 0.80
getTextureMethod · 0.45

Tested by

no test coverage detected