class
#include <VaultedVulkan/VV_SwapChain.hpp>
Swapchain A queue of images that can be presented to a surface.
Contents
This object represents a device created object on the host. As such ownership is tied to this host object. Due to this design, the object has no copy-construction allowed. Instead, default move constructor and assignment has been defined.
Base classes
- struct VV::V2::Swapchain
- A queue of images that can be presented to a surface.
Public types
-
using Parent = V2::
Swapchain
Constructors, destructors, conversion operators
- Swapchain()
- Default constructor.
- Swapchain(const LogicalDevice& _device)
- Specifies the logical device.
-
Swapchain(const LogicalDevice& _device,
const Memory::
AllocationCallbacks & _allocator) - Specifies the logical device and allocator.
- Swapchain(Swapchain&& _other) noexcept
- Performs a move operation to transfer ownership of the device object to this host object.
- ~Swapchain()
- Destroy a swapchain if the handle is null.
- operator Handle&()
- Implicit conversion to give a reference to its handle.
- operator const Handle&() const
- Implicit conversion to give a readonly reference to its handle.
- operator const Handle*() const
- Implicit conversion to give a pointer to its handle.
Public functions
- auto AcquireNextImage(u64 _timeout, Semaphore::Handle _semaphore, Fence::Handle _fence, ui32& _imageIndex) -> EResult
- Acquire an available presentable image to use, and retrieve the index of that image.
- auto Create(const CreateInfo& _info) -> EResult
- Create a swapchain with the specified create info.
- auto Create(const LogicalDevice& _deviceHandle, const CreateInfo& _info) -> EResult
- Create a swapchain with the specified logical device and create info.
-
auto Create(const LogicalDevice& _deviceHandle,
const CreateInfo& _info,
const Memory::
AllocationCallbacks & _allocator) -> EResult - Create a swapchain with the specified logical device, create info, and allocator.
- void Destroy()
- Destroy a swapchain.
- auto GetImages(DynamicArray<Image>& _images) -> EResult
- Gets the available swapchain images and stores them in the provided dynamic array container.
-
auto QueryImages(ui32& _numImages,
Image::
Handle * _imagesContainer) -> EResult - Obtain the array of presentable images associated with a swapchain.
- auto operator==(const Swapchain& _other) const -> bool
- Checks to see if its the same object by checking to see if its the same handle.
- auto operator=(Swapchain&& _other) -> Swapchain& noexcept
- Performs a move assignment operation to transfer ownership of the device object to this host object.
Protected variables
- Handle handle
-
const Memory::
AllocationCallbacks * allocator - const LogicalDevice* device