Skip to content

Class MetalSwapchain

Namespace: Apogee.Graphics.Metal
Assembly: Apogee.Graphics.dll

The images of a window: a CAMetalLayer that SDL made for it (the window needs ). The format is BGRA8 UNORM, like the Vulkan swapchain's: shaders write sRGB-encoded values themselves. A frame takes the layer's next drawable (Acquire) and presents it with its command buffer.

public sealed class MetalSwapchain : Swapchain, IDisposable

Inheritance

object ← Swapchain ← MetalSwapchain

Implements

IDisposable

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

PixelFormat

Height

public override uint Height { get; }

Property Value

uint

ImageCount

public override int ImageCount { get; }

Property Value

int

IsStale

The window's size is no longer the images' size.

public override bool IsStale { get; }

Property Value

bool

IsZeroSized

public override bool IsZeroSized { get; }

Property Value

bool

VSync

public override bool VSync { get; }

Property Value

bool

Width

public override uint Width { get; }

Property Value

uint

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

Recreate()

Makes the images fit the window again.

public override void Recreate()