sdlWaitForGpuIdle function

bool sdlWaitForGpuIdle(
  1. Pointer<SdlGpuDevice> device
)

Blocks the thread until the GPU is completely idle.

\param device a GPU context. \returns true on success, false on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

\sa SDL_WaitForGPUFences

extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUIdle( SDL_GPUDevice *device)

Implementation

bool sdlWaitForGpuIdle(Pointer<SdlGpuDevice> device) {
  final sdlWaitForGpuIdleLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlGpuDevice> device),
      int Function(Pointer<SdlGpuDevice> device)>('SDL_WaitForGPUIdle');
  return sdlWaitForGpuIdleLookupFunction(device) == 1;
}