How to stop screen update

Is there a way to stop the screen updates?

The project I am working on, is a simulation that sometimes needs to do some full speed iterations. It might help to stop updating the screen. Since the calculations itself can be done in less than a single millisec, it would speed up the simulation more than ten times.

So what I would like, is to stop updating the 3D world but keep the simpleUpdate loop.

Would this be possible?

You can update your simulation as often as you want. Call update on your own code as often as you need.

This is separate from how often the screen updates.

To put another way, you should have your game logic / simulation running in totally separate thread. In speeds that you yourself want. The simpleUpdate is your gateway to rendering, separate render thread loop. Just share the simulation data between the two, in a thread safe manner of course.

You can for example use ECS (Entity Component System) pattern to help you in this. Like pspeed’s Zay-ES library. For me at least that made separating everything a lot easier. Of course this is not the only way to go but I totally vouch for it…

It doesn’t even have to be a separate thread. If you separate out your simulation logic from the visualization then you can choose to call it from another thread or you can just call it as many times as will fit between rendering frames… or call it 10x per render frame.

Total flexibility.

Only in the multithreaded case would you have to worry about safely shared data structures. (Of which, yes, Zay-ES is a fine choice for an ECS based approach.)