SDL_SETDEFAULTTEXTURESCALEMODE(3)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– SDL_SetDefaultTextureScaleMode πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_SetDefaultTextureScaleMode β€” the lil function that decides how all your brand new textures get scaled. no cap.


✨ NAME ✨

SDL_SetDefaultTextureScaleMode β€” set the default scale mode for new textures for a given renderer. periodt. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_render.h>

bool SDL_SetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode scale_mode);

πŸ¦‹ DESCRIPTION πŸ¦‹

so when a renderer gets created, scale_mode defaults to SDL_SCALEMODE_LINEAR. that's just how it is, that's the vibe it ships with. πŸŽ€


🎯 FUNCTION PARAMETERS 🎯

  • renderer β€” the renderer to update. the one you're giving a glow-up to. ✨
  • scale_mode β€” the scale mode to change to for new textures. this is the whole point, bestie. 🫢

⭐ RETURN VALUE ⭐

returns true on success or false on failure β€” and if it fails, call SDL_GetError() for more info. she'll tell you what went wrong, iykyk. 😭


🧚 THREAD SAFETY 🧚

This function should only be called on the main thread. don't be messy, okay? main thread only. πŸ™ˆ

🌈 AVAILABILITY 🌈

this function is available since SDL 3.4.0. so if you're on something older… it's giving ancient. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, no notes πŸ’– source is Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, slay, go scale some textures bestie πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from