Fix renderer.drawCalls

This commit is contained in:
pandamicro
2018-02-28 16:49:02 +08:00
parent 979ffb587a
commit 90c363118e
+2 -2
View File
@@ -151,13 +151,13 @@ module.exports = {
},
render (ecScene) {
this.drawCalls = 0;
this.device._stats.drawcalls = 0;
if (ecScene) {
// walk entity component scene to generate models
this._walker.visit(ecScene);
this.drawCalls = this.device._stats.drawcalls;
// Render models in renderer scene
this._forward.render(this.scene);
this.drawCalls = this.device._stats.drawcalls;
}
},