Lugdunum  0.1.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lug::Graphics::Vulkan::API::Swapchain Class Reference

#include <Swapchain.hpp>

Collaboration diagram for lug::Graphics::Vulkan::API::Swapchain:
[legend]

Public Member Functions

 Swapchain ()=default
 
 Swapchain (const Swapchain &)=delete
 
 Swapchain (Swapchain &&Swapchain)
 
Swapchainoperator= (const Swapchain &)=delete
 
Swapchainoperator= (Swapchain &&Swapchain)
 
 ~Swapchain ()
 
 operator VkSwapchainKHR () const
 
void destroy ()
 
bool getNextImage (uint32_t *imageIndex, VkSemaphore semaphore=VK_NULL_HANDLE)
 
bool present (const Queue *presentQueue, uint32_t imageIndex, VkSemaphore semaphore=VK_NULL_HANDLE) const
 
const std::vector< Image > & getImages () const
 
const std::vector< ImageView > & getImagesViews () const
 
const VkSurfaceFormatKHR & getFormat () const
 
const VkExtent2D & getExtent () const
 
void setOutOfDate (bool outOfDate)
 
bool isOutOfDate () const
 

Private Member Functions

 Swapchain (VkSwapchainKHR swapchain, const Device *device, const VkSurfaceFormatKHR &swapchainFormat, const VkExtent2D &extent)
 
bool init ()
 

Private Attributes

VkSwapchainKHR _swapchain {VK_NULL_HANDLE}
 
const Device_device {nullptr}
 
std::vector< Image_images
 
std::vector< ImageView_imagesViews
 
VkSurfaceFormatKHR _format
 
VkExtent2D _extent
 
bool _outOfDate {false}
 

Friends

class Builder::Swapchain
 

Detailed Description

Definition at line 23 of file Swapchain.hpp.

Constructor & Destructor Documentation

◆ Swapchain() [1/4]

lug::Graphics::Vulkan::API::Swapchain::Swapchain ( )
default

◆ Swapchain() [2/4]

lug::Graphics::Vulkan::API::Swapchain::Swapchain ( const Swapchain )
delete

◆ Swapchain() [3/4]

lug::Graphics::Vulkan::API::Swapchain::Swapchain ( Swapchain &&  Swapchain)

Definition at line 16 of file Swapchain.cpp.

◆ ~Swapchain()

lug::Graphics::Vulkan::API::Swapchain::~Swapchain ( )

Definition at line 42 of file Swapchain.cpp.

◆ Swapchain() [4/4]

lug::Graphics::Vulkan::API::Swapchain::Swapchain ( VkSwapchainKHR  swapchain,
const Device device,
const VkSurfaceFormatKHR &  swapchainFormat,
const VkExtent2D &  extent 
)
explicitprivate

Definition at line 13 of file Swapchain.cpp.

Member Function Documentation

◆ operator=() [1/2]

Swapchain& lug::Graphics::Vulkan::API::Swapchain::operator= ( const Swapchain )
delete

◆ operator=() [2/2]

Swapchain & lug::Graphics::Vulkan::API::Swapchain::operator= ( Swapchain &&  Swapchain)

Definition at line 27 of file Swapchain.cpp.

◆ operator VkSwapchainKHR()

lug::Graphics::Vulkan::API::Swapchain::operator VkSwapchainKHR ( ) const
inlineexplicit

Definition at line 37 of file Swapchain.hpp.

◆ destroy()

void lug::Graphics::Vulkan::API::Swapchain::destroy ( )

Definition at line 46 of file Swapchain.cpp.

◆ getNextImage()

bool lug::Graphics::Vulkan::API::Swapchain::getNextImage ( uint32_t *  imageIndex,
VkSemaphore  semaphore = VK_NULL_HANDLE 
)

Definition at line 111 of file Swapchain.cpp.

◆ present()

bool lug::Graphics::Vulkan::API::Swapchain::present ( const Queue presentQueue,
uint32_t  imageIndex,
VkSemaphore  semaphore = VK_NULL_HANDLE 
) const

Definition at line 127 of file Swapchain.cpp.

◆ getImages()

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

Definition at line 9 of file Swapchain.inl.

◆ getImagesViews()

const std::vector< ImageView > & Swapchain::getImagesViews ( ) const
inline

Definition at line 13 of file Swapchain.inl.

◆ getFormat()

const VkSurfaceFormatKHR & Swapchain::getFormat ( ) const
inline

Definition at line 17 of file Swapchain.inl.

◆ getExtent()

const VkExtent2D & Swapchain::getExtent ( ) const
inline

Definition at line 21 of file Swapchain.inl.

◆ setOutOfDate()

void Swapchain::setOutOfDate ( bool  outOfDate)
inline

Definition at line 1 of file Swapchain.inl.

◆ isOutOfDate()

bool Swapchain::isOutOfDate ( ) const
inline

Definition at line 5 of file Swapchain.inl.

◆ init()

bool lug::Graphics::Vulkan::API::Swapchain::init ( )
private

Definition at line 61 of file Swapchain.cpp.

Friends And Related Function Documentation

◆ Builder::Swapchain

friend class Builder::Swapchain
friend

Definition at line 24 of file Swapchain.hpp.

Member Data Documentation

◆ _swapchain

VkSwapchainKHR lug::Graphics::Vulkan::API::Swapchain::_swapchain {VK_NULL_HANDLE}
private

Definition at line 61 of file Swapchain.hpp.

◆ _device

const Device* lug::Graphics::Vulkan::API::Swapchain::_device {nullptr}
private

Definition at line 62 of file Swapchain.hpp.

◆ _images

std::vector<Image> lug::Graphics::Vulkan::API::Swapchain::_images
private

Definition at line 64 of file Swapchain.hpp.

◆ _imagesViews

std::vector<ImageView> lug::Graphics::Vulkan::API::Swapchain::_imagesViews
private

Definition at line 65 of file Swapchain.hpp.

◆ _format

VkSurfaceFormatKHR lug::Graphics::Vulkan::API::Swapchain::_format
private

Definition at line 67 of file Swapchain.hpp.

◆ _extent

VkExtent2D lug::Graphics::Vulkan::API::Swapchain::_extent
private

Definition at line 68 of file Swapchain.hpp.

◆ _outOfDate

bool lug::Graphics::Vulkan::API::Swapchain::_outOfDate {false}
private

Definition at line 70 of file Swapchain.hpp.


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