mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14674 from super626/tilemap
fix fast tilemap blend function
This commit is contained in:
commit
727d857c88
|
@ -177,7 +177,8 @@ void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
|
|||
if(iter.second->getCount() > 0)
|
||||
{
|
||||
auto& cmd = _renderCommands[index++];
|
||||
cmd.init(iter.first, _texture->getName(), getGLProgramState(), BlendFunc::ALPHA_NON_PREMULTIPLIED, iter.second, _modelViewTransform, flags);
|
||||
auto blendfunc = _texture->hasPremultipliedAlpha() ? BlendFunc::ALPHA_PREMULTIPLIED : BlendFunc::ALPHA_NON_PREMULTIPLIED;
|
||||
cmd.init(iter.first, _texture->getName(), getGLProgramState(), blendfunc, iter.second, _modelViewTransform, flags);
|
||||
renderer->addCommand(&cmd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue