34 lines
606 B
C++
34 lines
606 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <vulkan/vulkan.h>
|
|
|
|
namespace Engine {
|
|
class LogicalDevice;
|
|
|
|
class SwapChain {
|
|
friend class LogicalDevice;
|
|
public:
|
|
SwapChain(LogicalDevice* logical);
|
|
SwapChain(LogicalDevice* logical, const VkExtent2D& extent);
|
|
~SwapChain();
|
|
|
|
VkExtent2D getExtent() const;
|
|
VkFramebuffer getFrameBuffer(uint32_t index);
|
|
|
|
private:
|
|
void create();
|
|
|
|
private:
|
|
LogicalDevice* logical;
|
|
VkSwapchainKHR vk;
|
|
std::vector<VkImage> images;
|
|
VkExtent2D extent;
|
|
std::vector<VkImageView> imageViews;
|
|
std::vector<VkFramebuffer> frameBuffers;
|
|
};
|
|
|
|
}
|
|
|