SDL_GetTextureScaleMode(3)

✨ SDL_GetTextureScaleMode ✨

okay bestie, welcome to the SDL_GetTextureScaleMode(3) page β€” this is the one where we find out what scale mode your texture is currently living in. it's giving "let me peek at your settings real quick" energy. πŸ’…


🌸 NAME 🌸

SDL_GetTextureScaleMode</p紫色> β€” Get the scale mode used for texture scale operations.

like, you wanna know how this texture scales? this is the function that tells you. no cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_render.h>

bool SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode);

that's the whole vibe right there. you pass in a texture, you pass in a pointer, you get the scale mode filled in. iconic behavior honestly. ✨


πŸ’– FUNCTION PARAMETERS πŸ’–

  • texture β€” the texture to query. like, the one you're curious about. the main character of this operation. πŸ‘‘
  • scaleMode β€” a pointer filled in with the current scale mode. yes, it gets filled in β€” that's the whole point. it's an out-param, bestie. 🫢

🌈 RETURN VALUE 🌈

Returns true on success or false on failure; call SDL_GetError() for more information.

so if you get true, slay. if you get false, don't panic β€” just hit up SDL_GetError() and it'll spill the tea on what went wrong. πŸ’€


πŸ”₯ THREAD SAFETY πŸ”₯

This function should only be called on the main thread.

⚠️ bestie. MAIN THREAD ONLY. do not try to be cute and call this from some random worker thread. it will not end well. periodt. πŸ’…

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0.

so if you're on something older than that... yeah, no. you don't have this one yet. upgrade your vibe. 🌸


πŸŽ€ SEE ALSO πŸŽ€

  • SDL_SetTextureScaleMode(3) β€” the setter to this getter. the other half of the duo. go check it out if you wanna change the scale mode instead of just peeking at it. πŸ¦‹

mwah πŸ’‹ that's the whole page. this manual page came to you from Simple Directmedia Layer, version SDL 3.4.18 β€” and yes, that's the same SDL_GetTextureScaleMode(3) we've been hyping up this whole time. stay hydrated, call it on the main thread, and go get that scale mode. πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from