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

SDL_BindGPUComputeSamplers

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

ヘッダ

SDL3/SDL_gpu.h

構文

void SDL_BindGPUComputeSamplers(SDL_GPUComputePass *compute_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_CreateGPUComputePipeline()の要求に従っていることを確認すること.

バージョン

SDL 3.2.0以降

関連項目

SDL Wikiへのリンク

SDL_BindGPUComputeSamplers - SDL Wiki