mirror of https://github.com/axmolengine/axmol.git
fix render stats bug
This commit is contained in:
parent
18a0f34c5c
commit
de3921c101
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue