Class VulkanSwapchain¶
Namespace: Apogee.Graphics.Vulkan
Assembly: Apogee.Graphics.dll
The images presented to a window. Their format is a UNORM one, B8G8R8A8 or R8G8B8A8: shaders write sRGB-encoded values themselves, which
also lets the dev overlay draw straight onto them. Created for a size from sizeSource and recreated whenever that changes.
public sealed class VulkanSwapchain : Swapchain, IDisposable
Inheritance¶
object ← Swapchain ← VulkanSwapchain
Implements¶
Inherited Members¶
Swapchain.VSync, Swapchain.Format, Swapchain.Width, Swapchain.Height, Swapchain.ImageCount, Swapchain.IsStale, Swapchain.IsZeroSized, Swapchain.Recreate(), Swapchain.Dispose(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Format¶
The format of the images: UNORM, because shaders write sRGB-encoded values themselves.
public override PixelFormat Format { get; }
Property Value¶
Height¶
public override uint Height { get; }
Property Value¶
ImageCount¶
public override int ImageCount { get; }
Property Value¶
IsStale¶
The window's size is no longer the images' size.
public override bool IsStale { get; }
Property Value¶
IsZeroSized¶
public override bool IsZeroSized { get; }
Property Value¶
VSync¶
public override bool VSync { get; }
Property Value¶
Width¶
public override uint Width { get; }
Property Value¶
Methods¶
Acquire(VkSemaphore, out uint)¶
public AcquireStatus Acquire(VkSemaphore signal, out uint imageIndex)
Parameters¶
signal VkSemaphore
imageIndex uint
Returns¶
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
Image(uint)¶
public VkImage Image(uint index)
Parameters¶
index uint
Returns¶
VkImage
ImageAt(uint)¶
The image as the engine's API sees it (owned by the swapchain; do not dispose it).
public GpuImage ImageAt(uint index)
Parameters¶
index uint
Returns¶
Present(uint)¶
Presents an image after the work that renders it. Returns false when the swapchain is out of date (the frame is still valid).
public bool Present(uint imageIndex)
Parameters¶
imageIndex uint
Returns¶
PresentSemaphore(uint)¶
The semaphore the present of image index waits on: one per image, so a semaphore is never signalled while an earlier present may still be waiting on it.
public VkSemaphore PresentSemaphore(uint index)
Parameters¶
index uint
Returns¶
VkSemaphore
Recreate()¶
Makes the images fit the window again.
public override void Recreate()
View(uint)¶
public VkImageView View(uint index)
Parameters¶
index uint
Returns¶
VkImageView