From 3c635d044e17c897023736919cad56aaca3502ad Mon Sep 17 00:00:00 2001 From: Nite Luo Date: Tue, 27 Jan 2015 11:12:51 -0800 Subject: [PATCH] Add Queue_count for render queues --- cocos/renderer/CCRenderer.cpp | 2 +- cocos/renderer/CCRenderer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos/renderer/CCRenderer.cpp b/cocos/renderer/CCRenderer.cpp index a9794ccde1..9ff56859fe 100644 --- a/cocos/renderer/CCRenderer.cpp +++ b/cocos/renderer/CCRenderer.cpp @@ -129,7 +129,7 @@ RenderCommand* RenderQueue::operator[](ssize_t index) const void RenderQueue::clear() { _commands.clear(); - for(int index = GLOBALZ_NEG; index <= GLOBALZ_POS; ++index) + for(int index = 0; index < QUEUE_COUNT; ++index) { _commands.push_back(std::vector()); } diff --git a/cocos/renderer/CCRenderer.h b/cocos/renderer/CCRenderer.h index adf700dde8..bf9b6477d8 100644 --- a/cocos/renderer/CCRenderer.h +++ b/cocos/renderer/CCRenderer.h @@ -56,6 +56,7 @@ public: GLOBALZ_ZERO = 3, GLOBALZ_POS = 4, QUEUE_GROUP_SIZE = 5, + QUEUE_COUNT, }; public: