Quote Originally Posted by anthibug View Post
-i want to launch a processing to take screenshots from A point to B point into the cloud points scene
-if i do that from the `main` thread, i'm freezeing my application : no buttons anymore, no resize, etc... or crash
I've to wait until the end of animation and cross finger that a crash doesn't happend cause of events.
It won't freeze as long as you let the application process its events from time to time. Make a single shot at a time instead of trying to make all at once in one long loop.

-it's not a game but i think you know that
It's still called a game loop.

-why draw all the time : because, as you said : "updateGL has to be called in the main thread"
But why all the time? If nothing changes, what's the point of redrawing the screen? If the content is already stale, drop the frame and continue calculations, no need to redraw the display again.

You surely have some function that changes the position of the camera that you call periodically - that's the "game loop". To have a steady movement it is important that you call the loop in regular intervals, otherwise your animation will get messed up. So call the loop every 40ms or so to get 25 frames per second, recalculate the position there, call updateGL if you want to redraw the display and make a shot. After you do that, return the flow to the event loop and let the timer timeout again 40ms-<time you spent on calculations/redrawing/snapshotting> later. All that in one thread and in one function call. If your computer cannot keep up, slow down the loop (have less fps but increase the step to compensate the animation).