Function Device.createSwapChain

Create a new SwapChain which targets surface.

SwapChain createSwapChain (
  const(Surface) surface,
  uint width,
  uint height,
  const(TextureFormat) format,
  const(TextureUsage) usage,
  const(PresentMode) presentMode,
  const(string) label = null
) const;

SwapChain createSwapChain (
  const(Surface) surface,
  const(__C.WGPUSwapChainDescriptor) descriptor
) const;