Label:Fixed shadow effect cause OpenGL error on IOS.

This commit is contained in:
WenhaiLin 2015-05-05 18:30:33 +08:00
parent 26c9be7881
commit 8f6277c540
1 changed files with 5 additions and 2 deletions

View File

@ -900,8 +900,11 @@ void Label::onDraw(const Mat4& transform, bool transformUpdated)
{ {
glprogram->setUniformLocationWith4f(_uniformTextColor, glprogram->setUniformLocationWith4f(_uniformTextColor,
_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a); _shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a);
glprogram->setUniformLocationWith4f(_uniformEffectColor, if (_currLabelEffect == LabelEffect::OUTLINE || _currLabelEffect == LabelEffect::GLOW)
_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a); {
glprogram->setUniformLocationWith4f(_uniformEffectColor,
_shadowColor4F.r, _shadowColor4F.g, _shadowColor4F.b, _shadowColor4F.a);
}
getGLProgram()->setUniformsForBuiltins(_shadowTransform); getGLProgram()->setUniformsForBuiltins(_shadowTransform);
for (const auto &child : _children) for (const auto &child : _children)