The Joe Engine
Joe's engine programming playground
JoeEngine::JEVulkanSwapChain Class Reference

The JEVulkanSwapChain class. More...

#include <VulkanSwapChain.h>

Public Member Functions

 JEVulkanSwapChain ()=default
 Constructor (default). More...
 
 ~JEVulkanSwapChain ()=default
 Destructor (default). More...
 
bool CheckDeviceExtensionSupport (VkPhysicalDevice physicalDevice) const
 Get extension support for the Vulkan physical device. More...
 
SwapChainSupportDetails QuerySwapChainSupport (VkPhysicalDevice physicalDevice, VkSurfaceKHR surface) const
 Get swap chain support details. More...
 
void Create (VkPhysicalDevice physicalDevice, VkDevice device, const JEVulkanWindow &vulkanWindow, uint32_t width, uint32_t height)
 Create the swap chain object. More...
 
void Cleanup (VkDevice device)
 
VkSwapchainKHR GetSwapChain () const
 
VkExtent2D GetExtent () const
 
VkFormat GetFormat () const
 
const std::vector< VkImageView > & GetImageViews () const
 

Static Public Member Functions

static std::vector< const char * > GetDeviceExtensions ()
 

Detailed Description

The JEVulkanSwapChain class.

Class that creates and manages data for the swap chain.

Constructor & Destructor Documentation

◆ JEVulkanSwapChain()

JoeEngine::JEVulkanSwapChain::JEVulkanSwapChain ( )
default

Constructor (default).

◆ ~JEVulkanSwapChain()

JoeEngine::JEVulkanSwapChain::~JEVulkanSwapChain ( )
default

Destructor (default).

Member Function Documentation

◆ CheckDeviceExtensionSupport()

bool JoeEngine::JEVulkanSwapChain::CheckDeviceExtensionSupport ( VkPhysicalDevice  physicalDevice) const

Get extension support for the Vulkan physical device.

Parameters
physicalDevicethe Vulkan physical device to check for extension support with.
Returns
true if the physical device supports all necessary extensions.

◆ Cleanup()

void JoeEngine::JEVulkanSwapChain::Cleanup ( VkDevice  device)

Cleanup memory.

Parameters
devicethe Vulkan logical device needed for cleanup.

◆ Create()

void JoeEngine::JEVulkanSwapChain::Create ( VkPhysicalDevice  physicalDevice,
VkDevice  device,
const JEVulkanWindow vulkanWindow,
uint32_t  width,
uint32_t  height 
)

Create the swap chain object.

Parameters
physicalDevicethe Vulkan physical device.
devicethe Vulkan logical device.
vulkanWindowthe JEVulkanWindow object.
widththe intended swap chain width.
heightthe intended swap chain height.

◆ GetDeviceExtensions()

static std::vector<const char*> JoeEngine::JEVulkanSwapChain::GetDeviceExtensions ( )
inlinestatic

Get necessary swap chain device extension name(s).

Returns
list of swap chain device extension name(s).

◆ GetExtent()

VkExtent2D JoeEngine::JEVulkanSwapChain::GetExtent ( ) const
inline

Get swap chain extent.

Returns
swap chain extent (dimensions).

◆ GetFormat()

VkFormat JoeEngine::JEVulkanSwapChain::GetFormat ( ) const
inline

Get swap chain format.

Returns
the swap chain image format.

◆ GetImageViews()

const std::vector<VkImageView>& JoeEngine::JEVulkanSwapChain::GetImageViews ( ) const
inline

Get list of swap chain image views.

Returns
list of swap chain image view objects.

◆ GetSwapChain()

VkSwapchainKHR JoeEngine::JEVulkanSwapChain::GetSwapChain ( ) const
inline

Get swap chain object.

Returns
swap chain object.

◆ QuerySwapChainSupport()

SwapChainSupportDetails JoeEngine::JEVulkanSwapChain::QuerySwapChainSupport ( VkPhysicalDevice  physicalDevice,
VkSurfaceKHR  surface 
) const

Get swap chain support details.

Returns a struct containing all data detailing the swap chain capabilities of the device.

Parameters
physicalDevicethe Vulkan physical device to check support with.
surfacethe Vulkan surface to check support with.
Returns
struct containing swap chain support details.

The documentation for this class was generated from the following files: