SDL_WindowSu...inComposition(3)

✨ SDL_WindowSupportsGPUSwapchainComposition ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we answer the big questions like "can this window even do that swapchain composition tho?" πŸ’…

🌸 NAME 🌸

SDL_WindowSupportsGPUSwapchainComposition β€” literally just vibes-checks whether a swapchain composition is supported by the window. That's it. That's the whole job. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_gpu.h>

bool SDL_WindowSupportsGPUSwapchainComposition(
    SDL_GPUDevice *device,
    SDL_Window *window,
    SDL_GPUSwapchainComposition swapchain_composition);

like, copy it exactly, don't freestyle the signature, i'm watching πŸ‘€


πŸ’– DESCRIPTION πŸ’–

okay so the one thing you gotta know before you even think about calling this:

The window must be claimed before calling this function. no claim, no answer, periodt. πŸ”₯

That's the whole description. Short, sweet, iconic. Claim your window first (iykyk) and then come ask.


πŸ‘‘ FUNCTION PARAMETERS πŸ‘‘

  • device β€” a GPU context. your GPU device, your main character. 🫢
  • window β€” an SDL_Window. the window in question, the one we're checking on. πŸͺŸ
  • swapchain_composition β€” the swapchain composition to check. like, the specific one you wanna know about. πŸ’œ

🌈 RETURN VALUE 🌈

  • Returns true if supported βœ…
  • Returns false if unsupported ❌

that's it, that's the tea. no secret third option. πŸ’€


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on anything older, sorry babe, not for you πŸ™ˆ


🧚 SEE ALSO 🧚


Simple Directmedia Layer β€’ SDL 3.4.18 β€” mwah, that's the version and the source, love that for us πŸ’– and yes this was the SDL_WindowSu...inComposition(3) page the whole time, the title was just being shy. bye bestie, go claim your windows! πŸŽ€βœ¨

πŸ“¦ where this page comes from