28 lines
685 B
C++
28 lines
685 B
C++
#pragma once
|
|
|
|
#include <Orange/Core/Span.h>
|
|
#include <Orange/Core/Result.h>
|
|
#include <Orange/Core/SmallVector.h>
|
|
|
|
#include <Orange/Render/RenderContext.h>
|
|
|
|
namespace orange
|
|
{
|
|
class Swapchain
|
|
{
|
|
public:
|
|
~Swapchain();
|
|
|
|
static Result<Swapchain> Create(RenderContext& context, VkSurfaceKHR surface);
|
|
protected:
|
|
friend class Result<Swapchain>;
|
|
Swapchain(VkDevice device, VkSurfaceKHR surface, VkExtent2D extent, VkSwapchainKHR swapchain);
|
|
private:
|
|
VkDevice m_device;
|
|
VkSurfaceKHR m_surface;
|
|
VkExtent2D m_extent;
|
|
VkSwapchainKHR m_swapchain;
|
|
|
|
SmallVector<VkImage, 8> m_images;
|
|
};
|
|
} |