#pragma once #include #include #include #include namespace theo { class swapchain_t { /// /// pair of front and back buffers... /// changes are flushed to the back buffer, then the front /// buffer gets overwritten by the back buffer when swapped... /// struct pair_t { std::vector< std::uint8_t > front, back; }; std::vector< pair_t > objs; std::vector< std::uint8_t > archive; public: explicit swapchain_t( const std::vector< std::uint8_t > &img ); static std::shared_ptr< swapchain_t > make( const std::vector< std::uint8_t > &img ); /// /// if theo::swapchain::swap takes in an empty vector then it will simply fill it up /// instead of flushing the iff data to the back buffer then swapping... /// /// void swap( std::vector< iff_t > &iffs ); }; } // namespace theo