Function SDL_CalculateGPUTextureFormatSize

pub unsafe extern "C" fn SDL_CalculateGPUTextureFormatSize(
    format: SDL_GPUTextureFormat,
    width: u32,
    height: u32,
    depth_or_layer_count: u32,
) -> u32 
Available on crate feature dep_sdl3 only.
Expand description

Calculate the size in bytes of a texture format with dimensions.

§Parameters

  • format: a texture format.
  • width: width in pixels.
  • height: height in pixels.
  • depth_or_layer_count: depth for 3D textures or layer count otherwise.

§Return value

Returns the size of a texture with this format and dimensions.

§Availability

This function is available since SDL 3.2.0.