SDL_GetRenderMetalLayer(3)
β¨ NAME β¨
SDL_GetRenderMetalLayer β bestie, this one hands you the CAMetalLayer that's vibing with your Metal renderer π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_render.h>
void * SDL_GetRenderMetalLayer(SDL_Renderer *renderer);
π¦ DESCRIPTION π¦
Okay so here's the tea β: this function returns a void *. Why, you ask? Because SDL said "not me dragging Metal's headers into everything" β that way SDL doesn't have to include them at all π. But don't panic, the pointer is legit, and you can safely cast it to a CAMetalLayer *. No cap, that's literally the whole point π«Ά
π FUNCTION PARAMETERS π
rendererβ the renderer you're querying, i.e. the one you want the layer for. That's it, that's the whole ask π
π RETURN VALUE π
On success you get a CAMetalLayer * back, slay β¨. If the renderer isn't a Metal renderer, you get NULL β so like, vibe check that thing before you use it, fr fr π
π₯ THREAD SAFETY π₯
This function should only be called on the main thread. Do not be out here calling it from a worker thread, bestie, that's not the move π
π AVAILABILITY π
This function is available since SDL 3.2.0 β so if you're on something older, it's giving "not yet, babe" π§
β SEE ALSO β
SDL_GetRenderMetalCommandEncoder(3)β the other Metal-flavored bestie you're gonna want next π
k byeee, go forth and render responsibly πΈπ
β¨ β this page came to you from the Simple Directmedia Layer crew, SDL version 3.4.18, and it's the SDL_GetRenderMetalLayer(3) page, mwah π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms