ComputePitch

Returns the row and slice pitch, for a given width, height and DXGI format.

Syntax

void ComputePitch(
         DXGI_FORMAT fmt,
         size_t width,
         size_t height,
         size_t &rowPitch,
         size_t &slicePitch,
         DWORD flags
)  

Parameters

fmt
Type: DXGI_FORMAT 

[in] One member of the DXGI_FORMAT enumeration.ration.

width
Type: size_t 

[in] Input width.

height
Type: size_t 

[in] Input height.

rowPitch
Type: size_t 

[out] The row pitch.

slicePitch
Type: size_t 

[out] The slice pitch.

flags
Type: DWORD 

[in] One or more flags from the CP_FLAGS enumeration.

Return value

None.

Requirements

Header: Declared in directxtex.h.