SDL_GPUBufferBinding(3type)
π SDL_GPUBufferBinding π
okay bestie, welcome to the SDL3 DATATYPES corner of the man pages, this one is literally called SDL_GPUBufferBinding(3type) and it's short, sweet, and iconic.
β¨ NAME β¨
SDL_GPUBufferBinding β it's a struct that holds the parameters you pass in a buffer binding call. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
typedef struct SDL_GPUBufferBinding
{
SDL_GPUBuffer *buffer; /**< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer. */
Uint32 offset; /**< The starting byte of the data to bind in the buffer. */
} SDL_GPUBufferBinding;
π¦ DESCRIPTION π¦
so like, this is the little bundle of info you hand over when you're binding a buffer. two fields, both serving, both necessary:
bufferβ the actualSDL_GPUBuffer *you wanna bind. π«Ά and listen, this is the important part: it must have been created withSDL_GPU_BUFFERUSAGE_VERTEXif you're using it withSDL_BindGPUVertexBuffers, orSDL_GPU_BUFFERUSAGE_INDEXif you're using it withSDL_BindGPUIndexBuffer. like, the usage flag has to match the call, it's giving matching outfits, you can't just mix and match. πoffsetβ aUint32, and it's the starting byte of the data to bind inside that buffer. so if you don't wanna bind from the very beginning, this is your moment. β¨
π AVAILABILITY π
this struct has been around since SDL 3.2.0. so if you're on something olderβ¦ bestie. upgrade. π
π SEE ALSO π
and that's the whole page, you ate that. this lil baddie comes to you courtesy of Simple Directmedia Layer, version SDL 3.4.18, and it's filed under SDL_GPUBufferBinding(3type) β mwah, go bind some buffers, queen. πβ¨ππ¦πΈ
π¦ 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