fix render stats bug

This commit is contained in:
yangxiao 2014-09-02 11:12:15 +08:00
parent 18a0f34c5c
commit de3921c101
5 changed files with 7 additions and 5 deletions

View File

@ -287,6 +287,9 @@ void Director::drawScene()
if (_runningScene)
{
//clear draw stats
_renderer->clearDrawStats();
Camera* defaultCamera = nullptr;
const auto& cameras = _runningScene->_cameras;
//draw with camera

View File

@ -444,9 +444,6 @@ void Renderer::render()
if (_glViewAssigned)
{
// cleanup
_drawnBatches = _drawnVertices = 0;
//Process render commands
//1. Sort render commands based on ID
for (auto &renderqueue : _renderGroups)

View File

@ -132,6 +132,8 @@ public:
ssize_t getDrawnVertices() const { return _drawnVertices; }
/* RenderCommands (except) QuadCommand should update this value */
void addDrawnVertices(ssize_t number) { _drawnVertices += number; };
/* clear draw stats */
void clearDrawStats() { _drawnBatches = _drawnVertices = 0; }
inline GroupCommandManager* getGroupCommandManager() const { return _groupCommandManager; };

@ -1 +1 @@
Subproject commit ee16f692722f6bbb7d485032751f9b826ec9e926
Subproject commit c1db553615789a1545d495d0d0fd6f620547f99d

@ -1 +1 @@
Subproject commit fb44ec8cf77f6f51503987c3a1a0964580b5d88f
Subproject commit 305f090f260a0b8766c3fd09a3d4d2072910bfd9