SDL_CalculateGPUTextureFormatSize(3)

SDL_CalculateGPUTextureFormatSize3

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

Usage

#include "SDL3/SDL.h"

Uint32 SDL_CalculateGPUTextureFormatSize( SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count);

Header file

Defined in SDL3/SDL_gpu.h

Function 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

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

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.