SDL_GETGPUTEXTUREFORMATFROMPIXELFORMAT(3)
β¨ NAME β¨
SDL_GetGPUTextureFormatFromPixelFormat β bestie, this is the little translator that takes an SDL pixel format and tells you which GPU texture format it matches up with π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
SDL_GPUTextureFormat SDL_GetGPUTextureFormatFromPixelFormat(SDL_PixelFormat format);
π FUNCTION PARAMETERS π
formatβ a pixel format. that's it, that's the whole vibe, just hand her the pixel format and she'll do the rest π«Ά
π¦ RETURN VALUE π¦
She hands you back the corresponding GPU texture format β iconic, no notes β¨
But listen carefully: if there's literally no corresponding GPU texture format, you get SDL_GPU_TEXTUREFORMAT_INVALID back instead. Not an error code, not a vibe, just that. so like, check for it, okay? π
π AVAILABILITY π
This function has been serving looks since SDL 3.4.0. if your SDL is older than that, she simply does not exist yet, sorry bestie π
and that's the whole page, you ate it, periodt π this lil slice of wisdom came to you from Simple Directmedia Layer, version SDL 3.4.18 β go forth and format your textures, iykyk ππ§π
π¦ 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