33 lines
541 B
C++
33 lines
541 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <vulkan/vulkan.h>
|
|
|
|
namespace Engine {
|
|
class LogicalDevice;
|
|
|
|
class SwapChain {
|
|
friend class LogicalDevice;
|
|
public:
|
|
SwapChain(LogicalDevice* logical);
|
|
~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;
|
|
};
|
|
|
|
}
|
|
|