sdlBindGpuVertexStorageTextures function gpu

void sdlBindGpuVertexStorageTextures(
  1. Pointer<SdlGpuRenderPass> renderPass,
  2. int firstSlot,
  3. Pointer<Pointer<SdlGpuTexture>> storageTextures,
  4. int numBindings,
)

Binds storage textures for use on the vertex shader.

These textures must have been created with SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in SDL_CreateGPUShader().

\param render_pass a render pass handle. \param first_slot the vertex storage texture slot to begin binding from. \param storage_textures an array of storage textures. \param num_bindings the number of storage texture to bind from the array.

\since This function is available since SDL 3.2.0.

\sa SDL_CreateGPUShader

extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures( SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUTexture *const *storage_textures, Uint32 num_bindings)

Implementation

void sdlBindGpuVertexStorageTextures(
  Pointer<SdlGpuRenderPass> renderPass,
  int firstSlot,
  Pointer<Pointer<SdlGpuTexture>> storageTextures,
  int numBindings,
) {
  final sdlBindGpuVertexStorageTexturesLookupFunction = _libSdl
      .lookupFunction<
        Void Function(
          Pointer<SdlGpuRenderPass> renderPass,
          Uint32 firstSlot,
          Pointer<Pointer<SdlGpuTexture>> storageTextures,
          Uint32 numBindings,
        ),
        void Function(
          Pointer<SdlGpuRenderPass> renderPass,
          int firstSlot,
          Pointer<Pointer<SdlGpuTexture>> storageTextures,
          int numBindings,
        )
      >('SDL_BindGPUVertexStorageTextures');
  return sdlBindGpuVertexStorageTexturesLookupFunction(
    renderPass,
    firstSlot,
    storageTextures,
    numBindings,
  );
}