SDL_GPUTRANSFERBUFFERUSAGE(3type)
π SDL_GPUTransferBufferUsage π
okay bestie, welcome to the SDL3 DATATYPES section of the manual β yes this is a 3type page, we're in the types girlie aisle today, and this one is genuinely a lil baby enum. tiny. precious. but IMPORTANT. let's get into it β¨
πΈ NAME πΈ
SDL_GPUTransferBufferUsage β it literally just tells everyone how a transfer buffer is intended to be used by the client. that's it. that's the whole job. she's a vibe descriptor, not a boss π
β¨ SYNOPSIS β¨
okay so first you gotta pull in the header, standard procedure:
#include <SDL3/SDL_gpu.h>
and then boom, here's the enum in all her glory:
typedef enum SDL_GPUTransferBufferUsage
{
SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD,
SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
} SDL_GPUTransferBufferUsage;
two values. that's the whole menu. SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD and SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD. pick one, know your purpose, slay π«Ά
π¦ DESCRIPTION π¦
okay so here's the tea, and it's lowkey a warning so listen up π
Note that mapping and copying FROM an upload transfer buffer or TO a download transfer buffer is undefined behavior.
fr fr. read that again. if you're going the wrong direction with your mapping and copying, that's UB territory, and UB does NOT play nice. it's giving chaos, it's giving unpredictable, it's giving "why is my program doing that" π. so like β upload means upload, download means download. respect the direction, bestie π
π AVAILABILITY π
this enum has been around since SDL 3.2.0. she's not new new, she's established. iconic behavior honestly β
π SEE ALSO π
SDL_CreateGPUTransferBuffer(3)β go make yourself a transfer buffer, you know you want to π
and that's the whole page, no cap. brought to you by the fine folks at Simple Directmedia Layer, living in SDL 3.4.18. mwah, go forth and use your transfer buffers correctly πβ¨π
π¦ 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