mirror of https://github.com/axmolengine/axmol.git
Fix #318
This commit is contained in:
parent
53bbf7368c
commit
472266c25c
|
@ -540,7 +540,8 @@ void ParticleBatchNode::setTexture(Texture2D* texture)
|
||||||
void ParticleBatchNode::updateProgramStateTexture()
|
void ParticleBatchNode::updateProgramStateTexture()
|
||||||
{
|
{
|
||||||
auto texture = _textureAtlas->getTexture();
|
auto texture = _textureAtlas->getTexture();
|
||||||
assert(texture != nullptr);
|
if (!texture)
|
||||||
|
return;
|
||||||
auto programState = _customCommand.getPipelineDescriptor().programState;
|
auto programState = _customCommand.getPipelineDescriptor().programState;
|
||||||
programState->setTexture(texture->getBackendTexture());
|
programState->setTexture(texture->getBackendTexture());
|
||||||
// If the new texture has No premultiplied alpha, AND the blendFunc hasn't been changed, then update it
|
// If the new texture has No premultiplied alpha, AND the blendFunc hasn't been changed, then update it
|
||||||
|
|
Loading…
Reference in New Issue