63 static VkPresentModeKHR
chooseSwapPresentMode(
const std::vector<VkPresentModeKHR> &availablePresentModes);
64 [[nodiscard]] VkExtent2D
chooseSwapExtent(
const VkSurfaceCapabilitiesKHR &capabilities)
const;
This file contains the Device class.
VkFormat m_swapChainImageFormat
SwapChain & operator=(const SwapChain &)=delete
SwapChain & operator=(SwapChain &&)=delete
SwapChain(const SwapChain &)=delete
size_t imageCount() const
VkFramebuffer getFrameBuffer(const unsigned long index) const
VkExtent2D chooseSwapExtent(const VkSurfaceCapabilitiesKHR &capabilities) const
VkRenderPass getRenderPass() const
VkFormat m_swapChainDepthFormat
std::vector< VkImageView > m_swapChainImageViews
std::vector< VkFence > m_inFlightFences
static VkPresentModeKHR chooseSwapPresentMode(const std::vector< VkPresentModeKHR > &availablePresentModes)
std::vector< VkSemaphore > m_imageAvailableSemaphores
SwapChain(SwapChain &&)=delete
std::shared_ptr< SwapChain > m_oldSwapChain
bool compareSwapFormats(const SwapChain &swapChain) const
VkExtent2D getSwapChainExtent() const
VkFormat getSwapChainImageFormat() const
float extentAspectRatio() const
VkExtent2D m_windowExtent
VkRenderPass m_renderPass
std::vector< VkFence > m_imagesInFlight
SwapChain(Device &deviceRef, const VkExtent2D windowExtentRef, std::shared_ptr< SwapChain > previous)
VkResult acquireNextImage(uint32_t *imageIndex) const
VkImageView getImageView(const int index) const
void createDepthResources()
std::vector< VkDeviceMemory > m_depthImageMemory
std::vector< VkFramebuffer > m_swapChainFrameBuffers
std::vector< VkImage > m_swapChainImages
VkFormat findDepthFormat() const
std::vector< VkImage > m_depthImages
std::vector< VkSemaphore > m_renderFinishedSemaphores
VkResult submitCommandBuffers(const VkCommandBuffer *buffers, const uint32_t *imageIndex)
VkExtent2D m_swapChainExtent
VkSwapchainKHR m_swapChain
SwapChain(Device &deviceRef, const VkExtent2D windowExtentRef)
void createFrameBuffers()
std::vector< VkImageView > m_depthImageViews
static VkSurfaceFormatKHR chooseSwapSurfaceFormat(const std::vector< VkSurfaceFormatKHR > &availableFormats)
static constexpr int MAX_FRAMES_IN_FLIGHT