SDL_SETDEFAULTTEXTURESCALEMODE(3)
π 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 π
SDL_GetDefaultTextureScaleMode(3)β the other half of this iconic duo π«Ά
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
- 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