Function SDL_WaitForGPUSwapchain

pub unsafe extern "C" fn SDL_WaitForGPUSwapchain(
    device: *mut SDL_GPUDevice,
    window: *mut SDL_Window,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Blocks the thread until a swapchain texture is available to be acquired.

§Parameters

  • device: a GPU context.
  • window: a window that has been claimed.

§Return value

Returns true on success, false on failure; call [SDL_GetError()] for more information.

§Thread safety

This function should only be called from the thread that created the window.

§Availability

This function is available since SDL 3.2.0.

§See also