sdlWindowSupportsGpuSwapchainComposition function gpu
bool
sdlWindowSupportsGpuSwapchainComposition(
- Pointer<
SdlGpuDevice> device, - Pointer<
SdlWindow> window, - int swapchainComposition
Determines whether a swapchain composition is supported by the window.
The window must be claimed before calling this function.
\param device a GPU context. \param window an SDL_Window. \param swapchain_composition the swapchain composition to check. \returns true if supported, false if unsupported.
\since This function is available since SDL 3.2.0.
\sa SDL_ClaimWindowForGPUDevice
extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUSwapchainComposition( SDL_GPUDevice *device, SDL_Window *window, SDL_GPUSwapchainComposition swapchain_composition)
Implementation
bool sdlWindowSupportsGpuSwapchainComposition(
Pointer<SdlGpuDevice> device,
Pointer<SdlWindow> window,
int swapchainComposition,
) {
final sdlWindowSupportsGpuSwapchainCompositionLookupFunction = _libSdl
.lookupFunction<
Uint8 Function(
Pointer<SdlGpuDevice> device,
Pointer<SdlWindow> window,
Int32 swapchainComposition,
),
int Function(
Pointer<SdlGpuDevice> device,
Pointer<SdlWindow> window,
int swapchainComposition,
)
>('SDL_WindowSupportsGPUSwapchainComposition');
return sdlWindowSupportsGpuSwapchainCompositionLookupFunction(
device,
window,
swapchainComposition,
) ==
1;
}