mirror of
https://gitee.com/nomat/lcc-ui-sorting-group-demo.git
synced 2024-12-26 03:38:27 +00:00
来自 MoXiGame developer4 的bug修复
This commit is contained in:
parent
4d9a0f87e8
commit
918104a057
@ -383,10 +383,10 @@ void ModelBatcher::flushRendererCache(){
|
|||||||
if(_rendererOrder){
|
if(_rendererOrder){
|
||||||
std::stable_sort(_rendererCache.begin(), _rendererCache.end(), [](NodeProxy* a, NodeProxy* b) { return a->getRenderPriority() < b->getRenderPriority(); });
|
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++){
|
for(std::vector<NodeProxy*>::iterator it = _rendererCache.begin(); it != _rendererCache.end(); it++){
|
||||||
NodeProxy* node = *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());
|
node->getAssembler()->handle(node, this, _flow->getRenderScene());
|
||||||
}
|
}
|
||||||
_rendererCache.clear();
|
_rendererCache.clear();
|
||||||
|
@ -362,6 +362,7 @@ void RenderFlow::render(NodeProxy* scene, float deltaTime, Camera *camera)
|
|||||||
|
|
||||||
auto traverseHandle = scene->traverseHandle;
|
auto traverseHandle = scene->traverseHandle;
|
||||||
traverseHandle(scene, _batcher, _scene);
|
traverseHandle(scene, _batcher, _scene);
|
||||||
|
_batcher->flushRendererCache();
|
||||||
_batcher->terminateBatch();
|
_batcher->terminateBatch();
|
||||||
|
|
||||||
if (camera) {
|
if (camera) {
|
||||||
|
Loading…
Reference in New Issue
Block a user