|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Manages Vulkan swapchain using C++ API (vulkan.hpp) More...
#include <VKSwapchain.hpp>
Collaboration diagram for MayaFlux::Core::VKSwapchain:Public Member Functions | |
| VKSwapchain ()=default | |
| ~VKSwapchain () | |
| VKSwapchain (const VKSwapchain &)=delete | |
| VKSwapchain & | operator= (const VKSwapchain &)=delete |
| bool | create (VKContext &context, vk::SurfaceKHR surface, const WindowCreateInfo &window_config) |
| Create swapchain for the given surface using VKContext. | |
| bool | recreate (uint32_t width, uint32_t height) |
| Recreate swapchain (for window resize) | |
| void | cleanup () |
| Cleanup swapchain resources. | |
| std::optional< uint32_t > | acquire_next_image (vk::Semaphore signal_semaphore, uint64_t timeout_ns=UINT64_MAX) |
| Acquire next image from swapchain. | |
| bool | present (uint32_t image_index, vk::Semaphore wait_semaphore, vk::Queue present_queue=nullptr) |
| Present image to screen. | |
| vk::SwapchainKHR | get_swapchain () const |
| vk::Format | get_image_format () const |
| vk::Extent2D | get_extent () const |
| uint32_t | get_image_count () const |
| const std::vector< vk::Image > & | get_images () const |
| const std::vector< vk::ImageView > & | get_image_views () const |
Static Public Member Functions | |
| static SwapchainSupportDetails | query_support (vk::PhysicalDevice physical_device, vk::SurfaceKHR surface) |
| Query swapchain support details for a device. | |
Private Member Functions | |
| vk::SurfaceFormatKHR | choose_surface_format (const std::vector< vk::SurfaceFormatKHR > &available_formats, GraphicsSurfaceInfo::SurfaceFormat desired_format, GraphicsSurfaceInfo::ColorSpace desired_color_space) const |
| Choose best surface format from available formats based on config. | |
| vk::PresentModeKHR | choose_present_mode (const std::vector< vk::PresentModeKHR > &available_modes, GraphicsSurfaceInfo::PresentMode desired_mode) const |
| Choose best present mode from available modes based on config. | |
| vk::Extent2D | choose_extent (const vk::SurfaceCapabilitiesKHR &capabilities, uint32_t width, uint32_t height) const |
| Choose swap extent based on capabilities. | |
| std::optional< vk::SurfaceFormatKHR > | find_hdr_format (const std::vector< vk::SurfaceFormatKHR > &available_formats) const |
| Find an HDR-capable format from available formats. | |
| bool | create_image_views () |
| Create image views for swapchain images. | |
| void | cleanup_swapchain () |
| Cleanup old swapchain during recreation. | |
Private Attributes | |
| VKContext * | m_context = nullptr |
| vk::SurfaceKHR | m_surface |
| const WindowCreateInfo * | m_window_config = nullptr |
| vk::SwapchainKHR | m_swapchain |
| std::vector< vk::Image > | m_images |
| std::vector< vk::ImageView > | m_image_views |
| vk::Format | m_image_format |
| vk::Extent2D | m_extent |
Manages Vulkan swapchain using C++ API (vulkan.hpp)
Definition at line 28 of file VKSwapchain.hpp.