How do I "pause" openframeworks

I need to tell openframeworks to stop running the update-draw loop, but everything on screen should stay as it is.
I also need to be able to unPause.

Have a look at ofSetBackgroundAuto(), this allows you to disable the automatic clearing of the background.

ofSetBackgroundAuto(false) just prevents the background from clearing before the draw.
The update and draw are still being called every frame, I do not want them to be called.

I don’t know if this is possible without bigger modifications. why don’t you just skip the code in update/draw with an if loop or something?

I could do that but I just thought there was a convenience function.


did you try ofSleepMillis(time_in_millisecond); ?

Sleeping blocks the main thread. I do not want that. How will I unpause?
if anyone has noticed the pausing behavior when you try to resize the window; that is exactly what I want.