sdlCreateGpuSampler function

Pointer<SdlGpuSampler> sdlCreateGpuSampler(
  1. Pointer<SdlGpuDevice> device,
  2. Pointer<SdlGpuSamplerCreateInfo> createinfo
)

Creates a sampler object to be used when binding textures in a graphics workflow.

\param device a GPU Context. \param createinfo a struct describing the state of the sampler to create. \returns a sampler object on success, or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

\sa SDL_BindGPUVertexSamplers \sa SDL_BindGPUFragmentSamplers \sa SDL_ReleaseGPUSampler

extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( SDL_GPUDevice *device, const SDL_GPUSamplerCreateInfo *createinfo)

Implementation

Pointer<SdlGpuSampler> sdlCreateGpuSampler(
    Pointer<SdlGpuDevice> device, Pointer<SdlGpuSamplerCreateInfo> createinfo) {
  final sdlCreateGpuSamplerLookupFunction = libSdl3.lookupFunction<
      Pointer<SdlGpuSampler> Function(Pointer<SdlGpuDevice> device,
          Pointer<SdlGpuSamplerCreateInfo> createinfo),
      Pointer<SdlGpuSampler> Function(Pointer<SdlGpuDevice> device,
          Pointer<SdlGpuSamplerCreateInfo> createinfo)>('SDL_CreateGPUSampler');
  return sdlCreateGpuSamplerLookupFunction(device, createinfo);
}