sdlQueryGpuFence function gpu

bool sdlQueryGpuFence(
  1. Pointer<SdlGpuDevice> device,
  2. Pointer<SdlGpuFence> fence
)

Checks the status of a fence.

\param device a GPU context. \param fence a fence. \returns true if the fence is signaled, false if it is not.

\since This function is available since SDL 3.2.0.

\sa SDL_SubmitGPUCommandBufferAndAcquireFence

extern SDL_DECLSPEC bool SDLCALL SDL_QueryGPUFence( SDL_GPUDevice *device, SDL_GPUFence *fence)

Implementation

bool sdlQueryGpuFence(
  Pointer<SdlGpuDevice> device,
  Pointer<SdlGpuFence> fence,
) {
  final sdlQueryGpuFenceLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(
          Pointer<SdlGpuDevice> device,
          Pointer<SdlGpuFence> fence,
        ),
        int Function(Pointer<SdlGpuDevice> device, Pointer<SdlGpuFence> fence)
      >('SDL_QueryGPUFence');
  return sdlQueryGpuFenceLookupFunction(device, fence) == 1;
}