evan 2026.1.4
Evan
Loading...
Searching...
No Matches
DesktopSwapchainImage.hpp
1/*
2** ETIB PROJECT, 2026
3** evan
4** File description:
5** DesktopSwapchainImage
6*/
7
8#pragma once
9
10#include "evan/ASwapchainImage.hpp"
11
12#include "evan/glfw/DesktopBackend.hpp"
13
14#include <limits>
15
16namespace evan
17{
35 {
36 public:
70 DesktopSwapchainImage(const DeviceContext &deviceContext,
71 GLFWwindow *window, VkRenderPass renderpass,
72 VkSwapchainKHR oldSwapchain = VK_NULL_HANDLE);
73
75
96 void destroy(VkDevice device) override;
97
121 void fillPresentInfo(VkPresentInfoKHR &presentInfo) const override;
122
131 VkSwapchainKHR _swapchain = VK_NULL_HANDLE;
132
133 private:
141 void cleanup();
142
147 VkDevice _device = VK_NULL_HANDLE;
168 VkSurfaceFormatKHR chooseSwapSurfaceFormat(
169 const std::vector<VkSurfaceFormatKHR> &availableFormats);
170
192 VkPresentModeKHR chooseSwapPresentMode(
193 const std::vector<VkPresentModeKHR> &availablePresentModes);
194
222 VkExtent2D
223 chooseSwapExtent(const VkSurfaceCapabilitiesKHR &capabilities,
224 GLFWwindow *window);
225 };
226} // namespace evan
ASwapchainImage is a class that represents an image in the swapchain of the Evan engine....
A swapchain image implementation for desktop platforms using GLFW.
void destroy(VkDevice device) override
Destroys the swapchain image and releases associated resources.
void fillPresentInfo(VkPresentInfoKHR &presentInfo) const override
Fills the VkPresentInfoKHR structure with the necessary information for presenting the swapchain imag...
Represents the device context for the engine, managing Vulkan-related resources and operations.