mirror of
https://gitee.com/nomat/lcc-ui-sorting-group-demo.git
synced 2024-12-25 11:18:28 +00:00
来自 MoXiGame developer4 的bug修复
This commit is contained in:
parent
4d9a0f87e8
commit
918104a057
@ -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<NodeProxy*>::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();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user