Commit 7300bf01

– add a mutex so that we do not render while re-creating the swapchain
– add a small config and some logic to throttle the rendering speed (no more 100% cpu usage)
– use a more reasonable example model (still not commited, licence unclear)

As suggested by the commit message in this commit the first mutex was introduced so OLives would not crash when resizing the window.
Furthermore the concept of frame drawing (FPS) and tick (per second) target was added, together with the concept of a configuration, which at this point was nothing but a POD struct. But why don’t we let the code highly complex code speak for itself:

// flesh this out into something to be
// loaded from a file
using Config = struct {
   uint32_t tickTarget;
   uint32_t fpsTarget;
   uint32_t windowWidth;
   uint32_t windowHeight;
};

Little did I know at this point that it would take another 1.5 years for this to be loaded from a file.
While no screenshot of any of this state exists, the tutorial model (a fairly complex chalet style house) was replaced by a different (low poly) model of three barrels.

Leave a Reply

Your email address will not be published. Required fields are marked *