10#include "evan/EvanPlatform.hpp"
12#include "evan/ADeviceBackend.hpp"
13#include "IDesktopPlatform.hpp"
14#include "evan/ASwapchainImage.hpp"
16#include "evan/Version.hpp"
18#include <utility/event/keyboard_event.hpp>
19#include <utility/event/mouse_button_event.hpp>
30const std::vector<const char *> deviceExtensions = {
31 VK_KHR_SWAPCHAIN_EXTENSION_NAME
191 uint32_t swapchainFormatCount)
const override;
275 const std::string &appName,
323 VkSurfaceKHR _surface = VK_NULL_HANDLE;
333 VkQueue _presentQueue = VK_NULL_HANDLE;
357 bool isDeviceSuitable(VkPhysicalDevice physicalDevice,
358 std::vector<const char *> deviceExtensions);
372 bool checkDeviceExtensionSupport(
373 VkPhysicalDevice device,
374 std::vector<const char *> deviceExtensions);
382 bool checkValidationLayerSupport();
392 void populateDebugMessengerCreateInfo(
393 VkDebugUtilsMessengerCreateInfoEXT &createInfo,
394 debugCallback_t debugCallback);
408 void setupCallbackEvent(
const IPlatform &platform);
Abstract base class for Vulkan device backends.
Represents the context for managing the swapchain in the rendering system.
ASwapchainImage is a class that represents an image in the swapchain of the Evan engine....
Desktop backend implementation.
VkSurfaceKHR getSurface() const
Retrieves the Vulkan surface associated with the Desktop backend.
Error preprocessFrame(ASwapchainContext &swapchainContext) override
Preprocesses a frame before rendering.
evan::SwapChainSupportDetails querySwapChainSupport()
Queries the swap chain support details for a given Vulkan physical device and surface....
uint32_t countSwapchainFormats() const override
Counts the number of supported swapchain formats for the Vulkan surface.
void createPresentQueue()
Creates the presentation queue for the device context.
~DesktopBackend()
Destructor for DesktopBackend.
QueueFamilyIndices findQueueFamilies() override
Finds the queue family indices for the Vulkan physical device.
std::vector< int64_t > enumerateSwapchainFormats(uint32_t swapchainFormatCount) const override
Enumerates the supported swapchain formats for the Vulkan surface.
Error postprocessFrame(ASwapchainContext &swapchainContext) override
Postprocesses a frame after rendering.
void createLogicalDevice() override
Creates a Vulkan logical device and retrieves the necessary queues for the Desktop platform.
Error processFrame(VkPresentInfoKHR presentInfo, ASwapchainImage &swapchainImage) override
Processes a frame for rendering.
void createInstance(const IPlatform &platform, const std::string &appName, Version &appVersion) override
Creates a Vulkan instance and initializes the device backend for the Desktop platform.
void pickPhysicalDevice() override
Picks a suitable Vulkan physical device for the Desktop platform.
Represents a software version using major, minor, and patch numbers.
A structure to represent Vulkan queue family indices.
Struct to encapsulate details about swap chain support.
std::vector< VkPresentModeKHR > presentModes
A list of supported presentation modes (e.g., FIFO, Mailbox, etc.).
std::vector< VkSurfaceFormatKHR > formats
A list of supported surface formats (color space and pixel format).
VkSurfaceCapabilitiesKHR capabilities
Vulkan surface capabilities, such as the minimum and maximum image count, extent, and supported trans...