BitsPerColor

Returns the color-depth (also known as the bit-depth) for a given DXGI format. For formats with a mix of different channel sizes, this function returns the color-depth of the largest channel.

Syntax

size_t BitsPerColor(
         DXGI_FORMAT fmt
)  

Parameters

fmt
Type: DXGI_FORMATĀ 

[in] One member of the DXGI_FORMAT enumeration.

Return value

Type: size_tĀ 

Bits per color.

Remarks

For formats with a mix of different channel sizes, this function returns the color-depth of the largest channel. For example, it returns 10 for DXGI_FORMAT_R10G10B10A2_UNORM.

Requirements

Header: Declared in directxtex.h.