Class SwapChain

A handle to a swap chain.

class SwapChain ;

A SwapChain represents the image or series of images that will be presented to a Surface. A SwapChain may be created with Device.createSwapChain.

Fields

NameTypeDescription
descriptor const(__C.WGPUSwapChainDescriptor)Describes this SwapChain.
label const(string)Optional, human-readable debug label for this swap chain.
surface const(Surface)Surface this swap chain renders to.

Properties

NameTypeDescription
format[get] TextureFormatTexture format of this swap chain.

Methods

NameDescription
getNextTexture () Returns the next texture to be presented by the swapchain for drawing.
present ()

See Also

wgpu::SwapChain