sdlGpuTextureSupportsSampleCount function

bool sdlGpuTextureSupportsSampleCount(
  1. Pointer<SdlGpuDevice> device,
  2. int format,
  3. int sampleCount
)

Determines if a sample count for a texture format is supported.

\param device a GPU context. \param format the texture format to check. \param sample_count the sample count to check. \returns a hardware-specific version of min(preferred, possible).

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsSampleCount( SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count)

Implementation

bool sdlGpuTextureSupportsSampleCount(
    Pointer<SdlGpuDevice> device, int format, int sampleCount) {
  final sdlGpuTextureSupportsSampleCountLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(
          Pointer<SdlGpuDevice> device, Int32 format, Int32 sampleCount),
      int Function(Pointer<SdlGpuDevice> device, int format,
          int sampleCount)>('SDL_GPUTextureSupportsSampleCount');
  return sdlGpuTextureSupportsSampleCountLookupFunction(
          device, format, sampleCount) ==
      1;
}