sdlCalculateGpuTextureFormatSize function
Calculate the size in bytes of a texture format with dimensions.
\param format a texture format. \param width width in pixels. \param height height in pixels. \param depth_or_layer_count depth for 3D textures or layer count otherwise. \returns the size of a texture with this format and dimensions.
\since This function is available since SDL 3.1.6.
extern SDL_DECLSPEC Uint32 SDLCALL SDL_CalculateGPUTextureFormatSize( SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count)
Implementation
int sdlCalculateGpuTextureFormatSize(
int format, int width, int height, int depthOrLayerCount) {
final sdlCalculateGpuTextureFormatSizeLookupFunction = libSdl3.lookupFunction<
Uint32 Function(
Int32 format, Uint32 width, Uint32 height, Uint32 depthOrLayerCount),
int Function(int format, int width, int height,
int depthOrLayerCount)>('SDL_CalculateGPUTextureFormatSize');
return sdlCalculateGpuTextureFormatSizeLookupFunction(
format, width, height, depthOrLayerCount);
}