sdlGetGpuSwapchainTextureFormat function gpu

int sdlGetGpuSwapchainTextureFormat(
  1. Pointer<SdlGpuDevice> device,
  2. Pointer<SdlWindow> window
)

Obtains the texture format of the swapchain for the given window.

Note that this format can change if the swapchain parameters change.

\param device a GPU context. \param window an SDL_Window that has been claimed. \returns the texture format of the swapchain.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureFormat( SDL_GPUDevice *device, SDL_Window *window)

Implementation

int sdlGetGpuSwapchainTextureFormat(
  Pointer<SdlGpuDevice> device,
  Pointer<SdlWindow> window,
) {
  final sdlGetGpuSwapchainTextureFormatLookupFunction = _libSdl
      .lookupFunction<
        Int32 Function(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window),
        int Function(Pointer<SdlGpuDevice> device, Pointer<SdlWindow> window)
      >('SDL_GetGPUSwapchainTextureFormat');
  return sdlGetGpuSwapchainTextureFormatLookupFunction(device, window);
}