SDL_Metal_GetLayer(3)

πŸ’… SDL_Metal_GetLayer(3) πŸ’…

okay bestie, welcome to the SDL3 functions corner of the group chat 🫢 today's main character is SDL_Metal_GetLayer β€” she lives in the SDL3 manual, she's a function, and she has exactly one job.


✨ NAME ✨

SDL_Metal_GetLayer β€” grab a pointer to the backing CAMetalLayer for the view you hand her. that's it, that's the whole vibe πŸ’–


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_metal.h>

void * SDL_Metal_GetLayer(SDL_MetalView view);

like. she's tiny. she's iconic. she returns a void * and she does not elaborate 😌


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • view β€” the SDL_MetalView object. yes queen, you gotta actually have one of those first, she can't pull a layer out of thin air πŸ’€

πŸ¦‹ RETURN VALUE πŸ¦‹

Returns a pointer. that's the whole sentence, no notes, no lore, no bonus features ✨


πŸ”₯ THREAD SAFETY πŸ”₯

no cap, this one is main thread only. This function should only be called on the main thread. do not be out here calling her from some random background thread, she will not be serving that energy 😭

🌈 AVAILABILITY 🌈

she's been around since SDL 3.2.0 β€” so if your SDL is older than that, bestie, she simply does not exist for you πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

nothing listed here, she's a solo act, main character energy only ⭐


and that's the whole page, you ate it, periodt πŸ’… the page came to you courtesy of Simple Directmedia Layer, version SDL 3.4.18, and that's the whole footer moment β€” go forth and get your layer, bestie πŸŽ€πŸ«ΆπŸ§š

πŸ“¦ where this page comes from