From 67ad24e7c13703a5a6c8305a342cd1a4b59a8bb6 Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 11 Sep 2014 15:44:31 +0800 Subject: [PATCH] remove orderOfArrival = 0 --- cocos/2d/CCNodeGrid.cpp | 5 +++-- cocos/2d/CCProtectedNode.cpp | 5 +++-- cocos/2d/CCRenderTexture.cpp | 4 +++- cocos/editor-support/cocostudio/CCArmature.cpp | 5 +++-- cocos/editor-support/cocostudio/CCBatchNode.cpp | 5 +++-- cocos/ui/UIScale9Sprite.cpp | 5 +++-- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index eb42030199..2153b9dca2 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -150,8 +150,9 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p this->draw(renderer, _modelViewTransform, dirty); } - // reset for next frame - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); if(_nodeGrid && _nodeGrid->isActive()) { diff --git a/cocos/2d/CCProtectedNode.cpp b/cocos/2d/CCProtectedNode.cpp index d65ca6a7b5..3a8259b48d 100644 --- a/cocos/2d/CCProtectedNode.cpp +++ b/cocos/2d/CCProtectedNode.cpp @@ -330,8 +330,9 @@ void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint3 for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) (*it)->visit(renderer, _modelViewTransform, flags); - // reset for next frame - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); } diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 13fed5a85e..201cf0cfc1 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -403,7 +403,9 @@ void RenderTexture::visit(Renderer *renderer, const Mat4 &parentTransform, uint3 director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); } bool RenderTexture::saveToFile(const std::string& filename, bool isRGBA, std::function callback) diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index a005e23127..62517e1604 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -486,8 +486,9 @@ void Armature::visit(cocos2d::Renderer *renderer, const Mat4 &parentTransform, u sortAllChildren(); draw(renderer, _modelViewTransform, flags); - // reset for next frame - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); } diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index c8128748f3..19d339d6c7 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -124,8 +124,9 @@ void BatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t sortAllChildren(); draw(renderer, _modelViewTransform, flags); - // reset for next frame - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); } diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index 13f6f2f92d..f5e61c659e 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -814,8 +814,9 @@ y+=ytranslate; \ for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) (*it)->visit(renderer, _modelViewTransform, flags); - // reset for next frame - _orderOfArrival = 0; + // FIX ME: Why need to set _orderOfArrival to 0?? + // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920 + // setOrderOfArrival(0); director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);