Diligent Engine API Reference: Diligent::TextureDesc Struct Reference

Diligent Engine API Reference

Public Member Functions | Public Attributes | List of all members
Diligent::TextureDesc Struct Reference

Texture description. More...

Inheritance diagram for Diligent::TextureDesc:

## Public Member Functions
| TextureDesc ()
| Initializes the structure members with default values. More...
bool | operator== (const TextureDesc &RHS) const
| Tests if two structures are equivalent. More...
Public Member Functions inherited from Diligent::DeviceObjectAttribs
| DeviceObjectAttribs ()
| Constructor intializes the structure members with default values.

## Public Attributes
RESOURCE_DIMENSION | Type
| Texture type. See Diligent::RESOURCE_DIMENSION for details.
Uint32 | Width
| Texture width, in pixels.
Uint32 | Height
| Texture height, in pixels.
TEXTURE_FORMAT | Format
| Texture format, see Diligent::TEXTURE_FORMAT.
Uint32 | MipLevels
| Number of Mip levels in the texture. Multisampled textures can only have 1 Mip level. Specify 0 to generate full mipmap chain.
Uint32 | SampleCount
| Number of samples. Only 2D textures or 2D texture arrays can be multisampled.
USAGE | Usage
| Texture usage. See Diligent::USAGE for details.
Uint32 | BindFlags
| Bind flags, see Diligent::BIND_FLAGS for details. The following bind flags are allowed: Diligent::BIND_SHADER_RESOURCE, Diligent::BIND_RENDER_TARGET, Diligent::BIND_DEPTH_STENCIL, Diligent::and BIND_UNORDERED_ACCESS. Multisampled textures cannot have Diligent::BIND_UNORDERED_ACCESS flag set.
Uint32 | CPUAccessFlags
| CPU access flags or 0 if no CPU access is allowed, see Diligent::CPU_ACCESS_FLAG for details.
Uint32 | MiscFlags
| Miscellaneous flags, see Diligent::MISC_TEXTURE_FLAG for details.
OptimizedClearValue | ClearValue
| Optimized clear value.
Uint32 | ArraySize
| For a 1D array or 2D array, number of array slices.
Uint32 | Depth
| For a 3D texture, number of depth slices.
Public Attributes inherited from Diligent::DeviceObjectAttribs
const Char * | Name
| Object name.

## Detailed Description

Texture description.

## Constructor & Destructor Documentation

## ◆ TextureDesc()

Diligent::TextureDesc::TextureDesc | ( |  | ) |
| inline

Initializes the structure members with default values.

Default values:

Member | Default value
--- | ---
Type | RESOURCE_DIM_UNDEFINED
Width | 0
Height | 0
ArraySize | 1
Format | TEX_FORMAT_UNKNOWN
MipLevels | 1
SampleCount | 1
Usage | USAGE_DEFAULT
BindFlags | 0
CPUAccessFlags | 0
MiscFlags | 0

## Member Function Documentation

## ◆ operator==()

bool Diligent::TextureDesc::operator== | ( | const TextureDesc & | RHS | ) | const
| inline

Tests if two structures are equivalent.

Parameters

  [in] | RHS | - reference to the structure to perform comparison with

Returns
  - True if all members of the two structures except for the Name are equal.
  - False otherwise. The operator ignores DeviceObjectAttribs::Name field as it does not affect the texture description state.