31 :
public std::enable_shared_from_this<KHRSwapchainImplVK> {
33 static std::shared_ptr<KHRSwapchainImplVK>
Create(
34 const std::shared_ptr<Context>& context,
37 bool enable_msaa =
true,
38 vk::SwapchainKHR old_swapchain = VK_NULL_HANDLE);
70 std::weak_ptr<Context> context_;
71 vk::UniqueSurfaceKHR surface_;
72 vk::Format surface_format_ = vk::Format::eUndefined;
73 vk::UniqueSwapchainKHR swapchain_;
74 std::shared_ptr<SwapchainTransientsVK> transients_;
75 std::vector<std::shared_ptr<KHRSwapchainImageVK>> images_;
76 std::vector<std::unique_ptr<KHRFrameSynchronizerVK>> synchronizers_;
77 std::vector<vk::UniqueSemaphore> present_semaphores_;
78 size_t current_frame_ = 0u;
80 bool enable_msaa_ =
true;
81 bool is_valid_ =
false;
84 vk::UniqueSurfaceKHR surface,
87 vk::SwapchainKHR old_swapchain);
89 bool Present(
const std::shared_ptr<KHRSwapchainImageVK>&
image,
92 void WaitIdle()
const;
static std::shared_ptr< KHRSwapchainImplVK > Create(const std::shared_ptr< Context > &context, vk::UniqueSurfaceKHR surface, const ISize &size, bool enable_msaa=true, vk::SwapchainKHR old_swapchain=VK_NULL_HANDLE)