目次 - SDL 3.0 API(機能別) - 3DレンダリングとGPUコンピューティング - SDL_BindGPUFragmentSamplers

SDL_BindGPUFragmentSamplers

テクスチャとサンプラのペアをフラグメントシェーダで使用するためにバインドする

ヘッダ

SDL3/SDL_gpu.h

構文

void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings);

引数

SDL_GPUComputePass *compute_passコンピュートパスハンドル
Uint32first_slotフラグメントサンプラのバインド先の先頭スロット
const SDL_GPUTextureSamplerBinding *texture_sampler_bindingsバインドするテクスチャとサンプラのペアの構造体の配列
Uint32num_bindingsバインドするテクスチャとサンプラのペアの構造体の要素数

詳細

テクスチャはSDL_GPU_TEXTUREUSAGE_SAMPLERで生成されている必要がある.

シェーダがSDL_CreateGPUShader()の要求に従っていることを確認すること.

バージョン

SDL 3.2.0以降

関連項目

SDL Wikiへのリンク

SDL_BindGPUFragmentSamplers - SDL Wiki