sdlGpuTextureSupportsFormat function
Determines whether a texture format is supported for a given type and usage.
\param device a GPU context. \param format the texture format to check. \param type the type of texture (2D, 3D, Cube). \param usage a bitmask of all usage scenarios to check. \returns whether the texture format is supported for this type and usage.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC bool SDLCALL SDL_GPUTextureSupportsFormat( SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage)
Implementation
bool sdlGpuTextureSupportsFormat(
Pointer<SdlGpuDevice> device, int format, int type, int usage) {
final sdlGpuTextureSupportsFormatLookupFunction = libSdl3.lookupFunction<
Uint8 Function(
Pointer<SdlGpuDevice> device, Int32 format, Int32 type, Uint32 usage),
int Function(Pointer<SdlGpuDevice> device, int format, int type,
int usage)>('SDL_GPUTextureSupportsFormat');
return sdlGpuTextureSupportsFormatLookupFunction(
device, format, type, usage) ==
1;
}