I am interested in threading into a small engine that I work on in my spare time, but I'm curious what works best. I'm interested in the recommended way to synchronize the physics stream with the rest of the engine, similar to ThisGuy . I work with the Bullet Physics SDK, which already uses the method of copying the data that he described, but I was interested, as soon as the bullet goes through one simulation, then synchronizes the data with other streams, will it lead to something like vertical synchronization, where is the rendering stream, halfway through the processing data, suddenly starting to use a new and different set of information?
Is this what the viewer will be able to notice? What if some kind of explosion appears with an object that must be destroyed?
If this is a problem, then the best way to solve it?
Block a physical stream so that it cannot do anything until the rendering stream (and basically every other stream) passes through its frame? It seems that it would lose processor time. Or the preferred triple buffer method, copy physics data to second place, continue physical modeling, and then copy this data to the rendering stream after it's ready?
What approaches do you recommend?
source share