PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::Swapchain Class Reference

Public Member Functions

 Swapchain (const PhysicalDevice &physicalDevice, const Surface &surface, const LogicalDevice &logicalDevice, const VkExtent2D &extent, const Swapchain *oldSwapchain=nullptr)
 
VkResult AcquireNextImage (const VkSemaphore &presentCompleteSemaphore=VK_NULL_HANDLE, VkFence fence=VK_NULL_HANDLE)
 
VkResult QueuePresent (const VkQueue &presentQueue, const VkSemaphore &waitSemaphore=VK_NULL_HANDLE)
 
bool IsSameExtent (const VkExtent2D &extent2D)
 
 operator const VkSwapchainKHR & () const
 
const VkExtent2D & GetExtent () const
 
uint32_t GetImageCount () const
 
VkSurfaceTransformFlagsKHR GetPreTransform () const
 
VkCompositeAlphaFlagBitsKHR GetCompositeAlpha () const
 
const std::vector< VkImage > & GetImages () const
 
const VkImage & GetActiveImage () const
 
const std::vector< VkImageView > & GetImageViews () const
 
const VkSwapchainKHR & GetSwapchain () const
 
uint32_t GetActiveImageIndex () const
 

Member Function Documentation

◆ AcquireNextImage()

VkResult PixelBullet::Swapchain::AcquireNextImage ( const VkSemaphore & presentCompleteSemaphore = VK_NULL_HANDLE,
VkFence fence = VK_NULL_HANDLE )

Acquires the next image in the swapchain into the internal acquired image. The function will always wait until the next image has been acquired by setting timeout to UINT64_MAX.

Parameters
presentCompleteSemaphoreA optional semaphore that is signaled when the image is ready for use.
fenceA optional fence that is signaled once the previous command buffer has completed.
Returns
Result of the image acquisition.

◆ QueuePresent()

VkResult PixelBullet::Swapchain::QueuePresent ( const VkQueue & presentQueue,
const VkSemaphore & waitSemaphore = VK_NULL_HANDLE )

Queue an image for presentation using the internal acquired image for queue presentation.

Parameters
presentQueuePresentation queue for presenting the image.
waitSemaphoreA optional semaphore that is waited on before the image is presented.
Returns
Result of the queue presentation.

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