Instantiates a new instance of a CD3D11_TEXTURE2D_DESC structure that is initialized with D3D11_TEXTURE2D_DESC values.
public:
CD3D11_TEXTURE2D_DESC(
DXGI_FORMAT format,
UINT width,
UINT height,
UINT arraySize,
UINT mipLevels,
UINT bindFlags,
D3D11_USAGE usage,
UINT cpuaccessFlags,
UINT sampleCount,
UINT sampleQuality,
UINT miscFlags
)
format
Type: DXGI_FORMAT
A DXGI_FORMAT-typed value that specifies the texture format.
width
Type: UINT
Texture width (in texels). The range is from 1 to D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION (16384). For a texture cube-map, the range is from 1 to D3D11_REQ_TEXTURECUBE_DIMENSION (16384). However, the range is actually constrained by the feature level at which you create the rendering device.
height
Type: UINT
Texture height (in texels). The range is from 1 to D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION (16384). For a texture cube-map, the range is from 1 to D3D11_REQ_TEXTURECUBE_DIMENSION (16384). However, the range is actually constrained by the feature level at which you create the rendering device.
arraySize
Type: UINT
Number of textures in the texture array. The range is from 1 to D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION (2048). For a texture cube-map, this value is a multiple of 6 (that is, 6 times the value in the NumCubes member of D3D11_TEXCUBE_ARRAY_SRV), and the range is from 6 to 2046. The range is actually constrained by the feature level at which you create the rendering device.
mipLevels
Type: UINT
The maximum number of mipmap levels in the texture. See the remarks in D3D11_TEX1D_SRV. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.
bindFlags
Type: UINT
A combination of D3D11_BIND_FLAG-typed values that are combined by using a bitwise OR operation. The resulting value specifies how to bind the texture to pipeline stages.
usage
Type: D3D11_USAGE
A D3D11_USAGE-typed value that identifies how the texture is to be read from and written to.
cpuaccessFlags
Type: UINT
A combination of D3D11_CPU_ACCESS_FLAG-typed values that are combined by using a bitwise OR operation. The resulting value specifies the types of CPU access allowed.
sampleCount
Type: UINT
The sample count. On Xbox One this can be 1, 2, 4 or 8. This is the number of points stored per pixel.
sampleQuality
Type: UINT
The sample quality. On Xbox One this can be 0 (no multisampling, use the same number of points stored and pixels rendered). For higher quality antialiasing set this to a value from 1 to 4, which enables EQAA (enhanced quality antialiasing). The higher the number the better the antialiasing but the higher the cost. The interpretation depends on sampleCount.
| sampleCount | Description |
|---|---|
| 1 | If sampleQuality is 0 this indicates no multisampling. A sampleQuality of 1 to 4 results in 2, 4, 8 or 16 samples (respectively) of EQAA. |
| 2 | A sampleQuality of 0 or 1 indicates 2 x multisampling (2 samples of EQAA match the 2 samples of multisampling, so EQAA is effectively not used). A sampleQuality of 2, 3 or 4 indicates 4, 8 or 16 samples (respectively) of EQAA. |
| 4 | A sampleQuality of 0, 1 or 2 indicates 4 x multisampling, a sampleQuality of 3 or 4 indicates 8 or 16 samples (respectively) of EQAA. |
| 8 | A sampleQuality of 0, 1, 2 or 3 indicates 8 x multisampling, a sampleQuality of 4 indicates 16 samples of EQAA. |
miscFlags
Type: UINT
A combination of D3D11_RESOURCE_MISC_FLAG-typed values that are combined by using a bitwise OR operation. The resulting value identifies other, less common resource options. For a texture cube-map, set the D3D11_RESOURCE_MISC_TEXTURECUBE flag. Cube-map arrays (that is, arraySize > 6) require feature level D3D_FEATURE_LEVEL_10_1 or higher.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).