+#ifndef MSP_GL_VULKAN_SWAPCHAIN_H_
+#define MSP_GL_VULKAN_SWAPCHAIN_H_
+
+#include "handles.h"
+#include "swapchaintexture.h"
+
+namespace Msp {
+namespace GL {
+
+class Device;
+class Semaphore;
+
+class SwapChain
+{
+ friend class VulkanCommands;
+
+private:
+ Device &device;
+ VkSwapchain handle = 0;
+ VkSurface surface = 0;
+ unsigned width = 0;
+ unsigned height = 0;
+ std::vector<SwapChainTexture> images;
+ int current_index = -1;
+
+public:
+ SwapChain(unsigned, unsigned, unsigned);
+ ~SwapChain();
+
+ unsigned get_n_images() const { return images.size(); }
+ SwapChainTexture &get_image(unsigned i) { return images[i]; }
+
+ unsigned begin_frame(Semaphore &);
+ void present_frame(Semaphore &);
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif