diff --git a/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.cpp b/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.cpp index 30756e2..1d41059 100644 --- a/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.cpp +++ b/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/ModelBatcher.cpp @@ -383,10 +383,10 @@ void ModelBatcher::flushRendererCache(){ if(_rendererOrder){ std::stable_sort(_rendererCache.begin(), _rendererCache.end(), [](NodeProxy* a, NodeProxy* b) { return a->getRenderPriority() < b->getRenderPriority(); }); } - CCLOGINFO("flushRendererCache : %d", _rendererCache.size()); + //CCLOGINFO("flushRendererCache : %d", _rendererCache.size()); for(std::vector::iterator it = _rendererCache.begin(); it != _rendererCache.end(); it++){ NodeProxy* node = *it; - CCLOGINFO("%s %d", node->getName().c_str(), node->getRenderPriority()); + //CCLOGINFO("%s %d", node->getName().c_str(), node->getRenderPriority()); node->getAssembler()->handle(node, this, _flow->getRenderScene()); } _rendererCache.clear(); diff --git a/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.cpp b/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.cpp index 9dd0605..afe8a6d 100644 --- a/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.cpp +++ b/2.4.11/lcc-ui-sorting-group-native/cocos2d-x/cocos/renderer/scene/RenderFlow.cpp @@ -362,6 +362,7 @@ void RenderFlow::render(NodeProxy* scene, float deltaTime, Camera *camera) auto traverseHandle = scene->traverseHandle; traverseHandle(scene, _batcher, _scene); + _batcher->flushRendererCache(); _batcher->terminateBatch(); if (camera) {