Label:Fixed transform not update correctly if this camera mask of Label isn't visible by the current visiting camera

This commit is contained in:
WenhaiLin 2015-03-05 11:27:53 +08:00 committed by minggo
parent 25dba56d68
commit cd95905a04
1 changed files with 6 additions and 1 deletions

View File

@ -1075,7 +1075,7 @@ void Label::drawTextSprite(Renderer *renderer, uint32_t parentFlags)
void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
if (! _visible || _originalUTF8String.empty() || !isVisitableByVisitingCamera())
if (! _visible || _originalUTF8String.empty())
{
return;
}
@ -1105,6 +1105,11 @@ void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t pare
_shadowDirty = false;
}
if (!isVisitableByVisitingCamera())
{
return;
}
// IMPORTANT:
// To ease the migration to v3.0, we still support the Mat4 stack,
// but it is deprecated and your code should not rely on it