10#include "evan/EvanPlatform.hpp"
12#include "evan/QueueFamilyIndices.hpp"
13#include "evan/RenderSettings.hpp"
14#include "evan/Version.hpp"
16#include <utility/logging/loggable.hpp>
17#include <utility/logging/default_logger.hpp>
40 protected utility::logging::Loggable<ASwapchainImage,
41 utility::logging::DefaultLogger>
65 virtual void destroy(VkDevice device) = 0;
159 const std::vector<VkFormat> &candidates,
160 VkImageTiling tiling,
161 VkFormatFeatureFlags features);
252 VkSampleCountFlagBits msaaSamples);
277 VkSampleCountFlagBits msaaSamples);
304 ColorAttachmentMode mode);
Abstract base class for Vulkan device backends.
ASwapchainImage is a class that represents an image in the swapchain of the Evan engine....
void createFramebuffers(VkDevice logicalDevice, VkRenderPass renderPass, ColorAttachmentMode mode)
Creates framebuffers for the swapchain images.
VkFramebuffer getFramebuffer(uint32_t index) const
Retrieves the Vulkan framebuffer associated with the swapchain image at the specified index.
void createImageViews(const ADeviceBackend &deviceBackend)
Creates image views for the swapchain images.
VkDeviceMemory _depthMemory
void createColorResources(const ADeviceBackend &deviceBackend, VkSampleCountFlagBits msaaSamples)
Creates a multisampled color attachment and its image view.
static VkFormat findDepthFormat(VkPhysicalDevice physicalDevice)
Finds a supported depth format for the swapchain context.
virtual void fillPresentInfo(VkPresentInfoKHR &presentInfo) const =0
Fills the VkPresentInfoKHR structure with the necessary information for presenting the swapchain imag...
void createDepthResources(const DeviceContext &deviceContext, VkSampleCountFlagBits msaaSamples)
Creates depth resources for the swapchain images.
VkDeviceMemory _colorMemory
static VkFormat findSupportedFormat(VkPhysicalDevice physicalDevice, const std::vector< VkFormat > &candidates, VkImageTiling tiling, VkFormatFeatureFlags features)
Finds a supported format from a list of candidates based on the specified tiling and features.
virtual void destroy(VkDevice device)=0
Destroys the swapchain image and releases associated resources.
uint32_t _arrayLayers
The number of array layers of the swapchain and attachment images.
void createImages(VkDevice logicalDevice, VkSwapchainKHR swapchain)
Creates the Vulkan images for the swapchain.
std::vector< VkImageView > _imageViews
uint32_t getFramebufferCount() const
Retrieves the number of framebuffers associated with the swapchain images.
std::vector< VkImage > _images
VkExtent2D getExtent() const
Retrieves the extent (width and height) of the swapchain images.
std::vector< VkFramebuffer > _framebuffers
Represents the device context for the engine, managing Vulkan-related resources and operations.