CPixel::ComputeVolumeSize method

The CPixel::ComputeVolumeSize method determines the amount of memory required to allocate a volume.

Syntax

static UINT ComputeVolumeSize(
   UINT      cpWidth,
   UINT      cpHeight,
   UINT      cpDepth,
   D3DFORMAT Format
);

Parameters

cpWidth Specifies the width in pixels of the volume.

cpHeight Specifies the height in pixels of the volume.

cpDepth Specifies the depth in pixels of the volume.

Format Uses a value from the D3DFORMAT enumeration to specify the surface format.

Return value

Returns the size, in bytes, of the volume.

Remarks

For more information about D3DFORMAT, see the Microsoft DirectX SDK documentation.

Requirements

Target platform

Desktop

Header

Pixel.hpp (include Pixel.hpp)