Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::TextureViewDesc Struct Reference

Texture view description. More...

#include <TextureView.h>

Inheritance diagram for Diligent::TextureViewDesc:
Diligent::DeviceObjectAttribs

Public Member Functions

constexpr bool operator== (const TextureViewDesc &RHS) const
 Tests if two texture view descriptions are equal.
 

Public Attributes

TEXTURE_VIEW_TYPE ViewType = TEXTURE_VIEW_UNDEFINED
 Describes the texture view type, see Diligent::TEXTURE_VIEW_TYPE for details.
 
RESOURCE_DIMENSION TextureDim = RESOURCE_DIM_UNDEFINED
 View interpretation of the original texture.
 
TEXTURE_FORMAT Format = TEX_FORMAT_UNKNOWN
 View format.
 
Uint32 MostDetailedMip = 0
 Most detailed mip level to use.
 
Uint32 NumMipLevels = 0
 Total number of mip levels for the view of the texture.
 
UAV_ACCESS_FLAG AccessFlags = UAV_ACCESS_UNSPECIFIED
 For an unordered access view, allowed access flags.
 
TEXTURE_VIEW_FLAGS Flags = TEXTURE_VIEW_FLAG_NONE
 Texture view flags, see Diligent::TEXTURE_VIEW_FLAGS.
 
TextureComponentMapping Swizzle
 Texture component swizzle, see Diligent::TextureComponentMapping.
 
- Public Attributes inherited from Diligent::DeviceObjectAttribs
const Char * Name = nullptr
 Object name.
 

Detailed Description

Texture view description.

Member Function Documentation

◆ operator==()

bool Diligent::TextureViewDesc::operator== ( const TextureViewDesc & RHS) const
inlineconstexpr

Tests if two texture view descriptions are equal.

Parameters
[in]RHS- reference to the structure to compare with.
Returns
true if all members of the two structures except for the Name are equal, and false otherwise.
Note
The operator ignores the Name field as it is used for debug purposes and doesn't affect the texture view properties.

Member Data Documentation

◆ AccessFlags

UAV_ACCESS_FLAG Diligent::TextureViewDesc::AccessFlags = UAV_ACCESS_UNSPECIFIED

For an unordered access view, allowed access flags.

See Diligent::UAV_ACCESS_FLAG for details.

◆ Format

TEXTURE_FORMAT Diligent::TextureViewDesc::Format = TEX_FORMAT_UNKNOWN

View format.

If default value Diligent::TEX_FORMAT_UNKNOWN is provided, the view format will match the referenced texture format.

◆ NumArraySlices

Uint32 Diligent::TextureViewDesc::NumArraySlices = 0

For a texture array, number of array slices to address in the view.

Set to 0 to address all array slices.

◆ NumDepthSlices

Uint32 Diligent::TextureViewDesc::NumDepthSlices

For a 3D texture, number of depth slices to address in the view.

Set to 0 to address all depth slices.

◆ NumMipLevels

Uint32 Diligent::TextureViewDesc::NumMipLevels = 0

Total number of mip levels for the view of the texture.

Render target and depth stencil views can address only one mip level. If 0 is provided, then for a shader resource view all mip levels will be referenced, and for a render target or a depth stencil view, one mip level will be referenced.

◆ TextureDim

RESOURCE_DIMENSION Diligent::TextureViewDesc::TextureDim = RESOURCE_DIM_UNDEFINED

View interpretation of the original texture.

For instance, one slice of a 2D texture array can be viewed as a 2D texture. See Diligent::RESOURCE_DIMENSION for a list of texture types. If default value Diligent::RESOURCE_DIM_UNDEFINED is provided, the view type will match the type of the referenced texture.