Merge pull request #8823 from super626/v3

add isVisibleByVisitingCamera check
This commit is contained in:
minggo 2014-10-18 15:11:45 +08:00
commit bca15538e3
3 changed files with 3 additions and 3 deletions

View File

@ -271,7 +271,7 @@ void ProtectedNode::reorderProtectedChild(cocos2d::Node *child, int localZOrder)
void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible)
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -231,7 +231,7 @@ void Widget::onExit()
void Widget::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
if (_visible)
if (_visible || !isVisitableByVisitingCamera())
{
adaptRenderers();
ProtectedNode::visit(renderer, parentTransform, parentFlags);

View File

@ -579,7 +579,7 @@ void ScrollView::onAfterDraw()
void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible
if (!isVisible())
if (!isVisible() || !isVisitableByVisitingCamera())
{
return;
}