vOOlkan
An object oriented approach to Vulkan
Vulkan::Swapchain Class Reference

Object which holds images to be presented to the WindowSurface. More...

#include <Swapchain.h>

Public Member Functions

 Swapchain (const PhysicalDevice &realGpu, const LogicalDevice &virtualGpu, const WindowSurface &windowSurface, const Window &window)
 the best swapchain possible to fit with the current GPU and window. More...
 
 Swapchain (const PhysicalDevice &realGpu, const LogicalDevice &virtualGpu, const WindowSurface &windowSurface, const Window &window, Swapchain &oldSwapchain)
 
 ~Swapchain ()
 
 Swapchain (const Swapchain &)=delete
 
Swapchainoperator= (const Swapchain &)=delete
 
 Swapchain (Swapchain &&) noexcept
 
Swapchainoperator= (Swapchain &&) noexcept
 
const VkSwapchainKHR & operator+ () const
 Returns the underlying VkSwapchainKHR object. More...
 
const SwapchainOptions::SurfaceFormatgetImageFormat ()
 
const SwapchainOptions::CapabilitiesgetSwapchainCapabilities ()
 
const std::vector< Image > & getImages () const
 Returns the images of this swapchain. More...
 
std::pair< unsigned int, unsigned int > getResolution () const
 Returns the width and height of the images in this swapchain. More...
 

Static Public Member Functions

static bool isSwapchainSupported (const PhysicalDevice &realGpu, const WindowSurface &windowSurface)
 Checks whether there exist a swapchain for this physiscal GPU and windows surface. More...
 

Detailed Description

Object which holds images to be presented to the WindowSurface.

Constructor & Destructor Documentation

◆ Swapchain() [1/4]

Vulkan::Swapchain::Swapchain ( const PhysicalDevice realGpu,
const LogicalDevice virtualGpu,
const WindowSurface windowSurface,
const Window window 
)

the best swapchain possible to fit with the current GPU and window.

Parameters
realGpuThe physical GPU.
virtualGpuThe logical GPU.
windowSurfaceThe surface where images will be drawn.
windowThe OS window where the Vulkan application is running.

◆ Swapchain() [2/4]

Vulkan::Swapchain::Swapchain ( const PhysicalDevice realGpu,
const LogicalDevice virtualGpu,
const WindowSurface windowSurface,
const Window window,
Swapchain oldSwapchain 
)

◆ ~Swapchain()

Vulkan::Swapchain::~Swapchain ( )

◆ Swapchain() [3/4]

Vulkan::Swapchain::Swapchain ( const Swapchain )
delete

◆ Swapchain() [4/4]

Vulkan::Swapchain::Swapchain ( Swapchain &&  )
noexcept

Member Function Documentation

◆ getImageFormat()

const Vulkan::SwapchainOptions::SurfaceFormat & Vulkan::Swapchain::getImageFormat ( )

◆ getImages()

const std::vector< Vulkan::Image > & Vulkan::Swapchain::getImages ( ) const

Returns the images of this swapchain.

Returns
The images of this swapchain.

◆ getResolution()

std::pair< unsigned int, unsigned int > Vulkan::Swapchain::getResolution ( ) const

Returns the width and height of the images in this swapchain.

Returns
The width and height of the images in this swapchain.

◆ getSwapchainCapabilities()

const Vulkan::SwapchainOptions::Capabilities & Vulkan::Swapchain::getSwapchainCapabilities ( )

◆ isSwapchainSupported()

bool Vulkan::Swapchain::isSwapchainSupported ( const PhysicalDevice realGpu,
const WindowSurface windowSurface 
)
static

Checks whether there exist a swapchain for this physiscal GPU and windows surface.

Parameters
realGpuThe physiscal GPU.
windowSurfaceThe window surface.
Returns
Whether the swapchain is supported.

◆ operator+()

const VkSwapchainKHR & Vulkan::Swapchain::operator+ ( ) const

Returns the underlying VkSwapchainKHR object.

Returns
The underlying VkSwapchainKHR object.

◆ operator=() [1/2]

Swapchain & Vulkan::Swapchain::operator= ( const Swapchain )
delete

◆ operator=() [2/2]

Vulkan::Swapchain & Vulkan::Swapchain::operator= ( Swapchain &&  movedFrom)
noexcept

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