SDL_GetRenderTarget(3)

🌸 NAME 🌸

okay bestie, welcome to the SDL3 FUNCTIONS page for SDL_GetRenderTarget(3) πŸ’–

SDL_GetRenderTarget β€” get the current render target. periodt.


✨ SYNOPSIS ✨

#include <SDL3/SDL_render.h>

SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer);

πŸ’… DESCRIPTION πŸ’…

okay so the default render target is literally the window that the renderer was created for, and when that's the situation, it gets reported as a NULL here. no cap. 🌈


🫢 FUNCTION PARAMETERS 🫢

  • renderer β€” the rendering context. that's the one you're passing in, bestie πŸŽ€

🌟 RETURN VALUE 🌟

Returns the current render target, or NULL for the default render target. iconic behavior, honestly πŸ‘‘


🧡 THREAD SAFETY 🧡

This function should only be called on the main thread. like, do not try to be slick and call it from another thread β€” main thread only, fr fr πŸ’€


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. slay πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹


mwah πŸ’‹ signing off from Simple Directmedia Layer, version SDL 3.4.18, page SDL_GetRenderTarget(3) πŸŽ€ (no date on this footer, just vibes)

πŸ“¦ where this page comes from