Kale
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Kale::Vulkan::SwapChainSupportDetails Class Reference

#include <SwapChainSupportDetails.hpp>

Public Member Functions

 SwapChainSupportDetails ()
 
 SwapChainSupportDetails (const vk::PhysicalDevice &physicalDevice)
 
bool deviceIsAdequate () const
 
vk::SurfaceFormatKHR chooseFormat () const
 
vk::PresentModeKHR choosePresentMode () const
 
vk::Extent2D chooseSwapExtent () const
 

Public Attributes

vk::SurfaceCapabilitiesKHR capabilities
 
std::vector< vk::SurfaceFormatKHR > formats
 
std::vector< vk::PresentModeKHR > presentModes
 

Detailed Description

Holds information regarding the swap chain support details for a physical device

Definition at line 29 of file SwapChainSupportDetails.hpp.

Constructor & Destructor Documentation

◆ SwapChainSupportDetails() [1/2]

SwapChainSupportDetails::SwapChainSupportDetails ( )

Creates an uninitialized object

Definition at line 33 of file SwapChainSupportDetails.cpp.

◆ SwapChainSupportDetails() [2/2]

SwapChainSupportDetails::SwapChainSupportDetails ( const vk::PhysicalDevice & physicalDevice)

Populates the struct given the physical device and the surface

Parameters
physicalDeviceThe physical device to check for

Definition at line 41 of file SwapChainSupportDetails.cpp.

Member Function Documentation

◆ chooseFormat()

vk::SurfaceFormatKHR SwapChainSupportDetails::chooseFormat ( ) const

Chooses a surface format which passes all required checks for use for rendering

Returns
The chosen surface format

Definition at line 61 of file SwapChainSupportDetails.cpp.

◆ choosePresentMode()

vk::PresentModeKHR SwapChainSupportDetails::choosePresentMode ( ) const

Chooses a presentation mode for the application to use

Returns
The chosen presentation mode

Definition at line 73 of file SwapChainSupportDetails.cpp.

◆ chooseSwapExtent()

vk::Extent2D SwapChainSupportDetails::chooseSwapExtent ( ) const

Chooses The resolution of the swap chain images

Returns
The resolution of the swap chain images

Definition at line 85 of file SwapChainSupportDetails.cpp.

◆ deviceIsAdequate()

bool SwapChainSupportDetails::deviceIsAdequate ( ) const

Checks whether or not the device is adequate for our purposes (Must have at least 1 format & present mode)

Returns
True when there is at least one format and present mode

Definition at line 53 of file SwapChainSupportDetails.cpp.

Member Data Documentation

◆ capabilities

vk::SurfaceCapabilitiesKHR Kale::Vulkan::SwapChainSupportDetails::capabilities

The capabilities of the surface

Definition at line 35 of file SwapChainSupportDetails.hpp.

◆ formats

std::vector<vk::SurfaceFormatKHR> Kale::Vulkan::SwapChainSupportDetails::formats

The supported formats by this physical device and surface

Definition at line 40 of file SwapChainSupportDetails.hpp.

◆ presentModes

std::vector<vk::PresentModeKHR> Kale::Vulkan::SwapChainSupportDetails::presentModes

The present modes supported by this physical device and surface

Definition at line 45 of file SwapChainSupportDetails.hpp.


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