Draft: swapchain: completely refactor API
The v1 interface was unnecessarily clunky, non-descriptive, stateful and was designed in a way that made it fundamentally impossible to behave consistently across platforms.
This ground-up redesign will hopefully solve all of these problems, while also adding space in the appropriate params structs to extend this with support for vsync timing/scheduling (once I can get my hands on any implementation that supports these extensions).
I will probably implement both the v1 and v2 API on top of lower-level primitives exposed by the underlying implementation, to leverage as much code reuse as possible.
This document just updates the public headers. For clarity, the old API has been moved to a separate file swapchain_v1.h
, but in the final commit, I will just include those stubs at the bottom of swapchain.h
.