LinesMesh does not render

So we can say basically that on demand rendering is safe when we:

  1. disable paralell shader compilation: engine.getCaps().parallelShaderCompile = null
  2. kill the render when the scene is ready: scene.onSceneReadyObservable.addOnce(() => engine.stopRenderLoop())
  3. we have to call scene.render() when we want to render the changes to the scene

This PG renders the changes one by one:

This PG renders the changes all at once:

Observables will not work because they needs the render loop to be running. So in case we change the camera we need to set forceRender = true as well and we can’t use the camera.onViewMatrixChangedObservable

2 Likes