![]() |
HoviTron Video Pipeline
|
Encapsulate the notion of Swapchain. More...
#include <SwapchainAbstract.h>
Public Member Functions | |
virtual std::tuple< uint32_t, std::optional< vk::Semaphore > > | acquireImage ()=0 |
virtual void | presentImage (uint32_t imageIndex, vk::Semaphore &renderingFinnished)=0 |
virtual void | presentImage (uint32_t imageIndex, vk::Fence &renderingFinnishedFence)=0 |
virtual void | cleanup ()=0 |
virtual vk::ImageView | getSwapchainImageView (int elem)=0 |
virtual int | getAttachmentSize ()=0 |
virtual vk::Image | getSwapchainImage (int index)=0 |
virtual vk::Image | getCurrentImage ()=0 |
Data Fields | |
std::variant< vk::SwapchainKHR > | handle |
vk::Extent2D | swapchainExtent |
vk::Format | swapchainFormat |
Protected Attributes | |
std::vector< vk::ImageView > | swapchainImageViews |
VulkanWrapper * | wraps = nullptr |
WindowAbstract * | window = nullptr |
Encapsulate the notion of Swapchain.
Virtual class to encapsulate the notion of swapchain. Swapchain can be seen as a stack of image waiting to be displayed. When displaying the rendered image on the computer screen GLFW library is used and we use vkSwapchainKHR object. When displaying the rendered image on the Head Mounted Display (OpenXR usage). The XrSwapchain object is used. The SwapchainAbstract have the purpose to abstract the difference between the two previous options from the rest of the code using inheritance.
Definition at line 39 of file SwapchainAbstract.h.
|
pure virtual |
Acquire the next image that will be the rendering target and optionnaly the semaphore signalling when the image is available
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
cleanUp ressources
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Return the size of the attachment
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Return the current vk::Image in use
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Return vk::Image corresponding to the requested index
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Used to retrieve the vk::ImageView corresponding to the image used
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Called to signal that rendering work have been submitted to the GPU, and that the fence have to be used for synchronization
Implemented in SwapchainCommon, and SwapchainOpenXR.
|
pure virtual |
Called to signal that rendering work have been submitted to the GPU, and that the Semaphore have to be used for synchronization
Implemented in SwapchainCommon, and SwapchainOpenXR.
std::variant<vk::SwapchainKHR> SwapchainAbstract::handle |
Contain the handle of the swapchain. Can be only vk::SwapchainKHR when USE_OPENXR macro is not defined
Definition at line 66 of file SwapchainAbstract.h.
vk::Extent2D SwapchainAbstract::swapchainExtent |
Dimension of the images that composes the swapchain
Definition at line 69 of file SwapchainAbstract.h.
vk::Format SwapchainAbstract::swapchainFormat |
Return the format used by this swapchain
Definition at line 71 of file SwapchainAbstract.h.
|
protected |
View to the images of the swapchain
Definition at line 75 of file SwapchainAbstract.h.
|
protected |
Pointer to the window
Definition at line 79 of file SwapchainAbstract.h.
|
protected |
pointer to the VulkanWrapper
Definition at line 77 of file SwapchainAbstract.h.