Skip to main content

SDL_CalculateGPUTextureFormatSize

Function SDL_CalculateGPUTextureFormatSize 

Source
pub unsafe extern "C" fn SDL_CalculateGPUTextureFormatSize(
    format: SDL_GPUTextureFormat,
    width: Uint32,
    height: Uint32,
    depth_or_layer_count: Uint32,
) -> Uint32
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.