SDL_SetGPUBufferName(3)
π SDL_SetGPUBufferName(3) β the SDL3 FUNCTIONS girlies know
okay so bestie, this one lives in the SDL3 FUNCTIONS family and it's literally just "give your buffer a nickname". That's it. That's the whole vibe. π
β¨ NAME β¨
SDL_SetGPUBufferName β sets an arbitrary string constant to label a buffer. π·οΈ
π¦ SYNOPSIS π¦
#include <SDL3/SDL_gpu.h>
void SDL_SetGPUBufferName(
SDL_GPUDevice *device,
SDL_GPUBuffer *buffer,
const char *text);
no cap, that's the whole signature. void. it returns nothing. it just labels. π
πΈ DESCRIPTION πΈ
okay so here's the tea, and it's important tea: you should use SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING with SDL_CreateGPUBuffer instead of this function to avoid thread safety issues. π
like, I know, I know, you found a naming function and you're obsessed (same), but the grown-up move is to name it at creation time. this one is the "oh no I forgot to name it" emergency option. π
π FUNCTION PARAMETERS π
deviceβ a GPU Context. β¨bufferβ a buffer to attach the name to. it's getting a glow-up and a name, iconic. πtextβ a UTF-8 string constant to mark as the name of the buffer. yes bestie, constant, keep it in mind. π
π THREAD SAFETY π
this function is not thread safe. you must make sure the buffer is not simultaneously used by any other thread. fr fr, do not let two threads touch this buffer at the same time, that's giving undefined chaos and we don't do that here. π«Ά
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, sorry babe, no naming for you. π
π§ SEE ALSO π§
SDL_CreateGPUBuffer(3)β the main character of this whole storyline, go read it first. β
and that's the page!! mwah π this manual page came to you from Simple Directmedia Layer, rockin' SDL 3.4.18. stay hydrated, name your buffers at creation, and go slay β¨π¦π
π¦ 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