1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 13:17:46 +00:00
novus/renderer/include/swapchain.h
Joshua Goins e34daadbcd Split up Renderer's source files and a lot of refactoring
This now splits up the rendering system into sensible parts, and makes
it easier to switch between the simple renderer and the new experimental
one. Lots of refactors I needed to do for a while are now done, too.
2024-04-21 17:35:51 -04:00

28 lines
No EOL
635 B
C++

#pragma once
#include <array>
#include <vector>
#include <vulkan/vulkan.h>
class Device;
class SwapChain
{
public:
SwapChain(Device &device, VkSurfaceKHR surface, int width, int height);
void resize(VkSurfaceKHR surface, int width, int height);
VkSwapchainKHR swapchain = VK_NULL_HANDLE;
VkExtent2D extent;
std::vector<VkImage> swapchainImages;
std::vector<VkImageView> swapchainViews;
std::array<VkFence, 3> inFlightFences;
std::array<VkSemaphore, 3> imageAvailableSemaphores, renderFinishedSemaphores;
uint32_t currentFrame = 0;
VkFormat surfaceFormat;
private:
Device &m_device;
};