SDL_BindGPUVertexSamplers(3)
β¨ SDL_BindGPUVertexSamplers β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, page SDL_BindGPUVertexSamplers(3) π
this one's all about telling your vertex shader where its texture-sampler pairs live. let's get into it π«Ά
πΈ NAME πΈ
SDL_BindGPUVertexSamplers β binds texture-sampler pairs for use on the vertex shader.
π SYNOPSIS π
#include <SDL3/SDL_gpu.h>
void SDL_BindGPUVertexSamplers(
SDL_GPURenderPass *render_pass,
Uint32 first_slot,
const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
Uint32 num_bindings);
π¦ DESCRIPTION π¦
so here's the vibe check: those textures you're binding? they must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER. no exceptions, no cap π«
also, the textures being bound must have a matching type declared in the shader β like 2D, 3D, etc. it's giving "they have to actually match, bestie". and multisample textures are not allowed π periodt.
and be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader() β go read that one too, it's iconic and you need it. iykyk β¨
π FUNCTION PARAMETERS π
render_passβ a render pass handle. your main character, the thing everything happens inside of π¬first_slotβ the vertex sampler slot to begin binding from. where the story starts, basically πtexture_sampler_bindingsβ an array of texture-sampler binding structs. the whole squad, lined up π«num_bindingsβ the number of texture-sampler pairs to bind from the array. how many of the squad are actually showing up π₯
β AVAILABILITY β
this function is available since SDL 3.2.0. she's been here a minute and she ate π
π SEE ALSO π
and that's the whole page, bestie π she was written by the lovely folks at Simple Directmedia Layer, version SDL 3.4.18, and she's out here living her best life in the manual. go forth and bind responsibly, mwah ππβ¨
π¦ 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