Well, I integrated Babylon Js scenes switch. It works fine on the playground, but not as expected in the browser.
I download the playground and launch in the browser: When I switch to scene 0, draw calls are only 2, but when a switch to scene 1, draw calls keep incrementing to infinity.
It has no influence on the FPS but I’m wondering if it could cause some problems later.
Yep, that’s right, thank you. So the draw calls has no issue.
Do you now why draw calls of scene0 (hidden scene) keeps growing up when switched to scene1 ?
This is not a bug, just wanna understand why.
That’s because calling scene0.render() notifies a certain observer (onBeforeAnimationsObservable) on which the inspector registers a callback that resets the draw call count. If scene0.render() is not called anymore (which is what happens when you switch to scene 2), this counter is not reset anymore.