D3D11_TEXTURE1D_DESC structure (d3d11.h)
Describes a 1D texture.
Syntax
typedef struct D3D11_TEXTURE1D_DESC {
UINT Width;
UINT MipLevels;
UINT ArraySize;
DXGI_FORMAT Format;
D3D11_USAGE Usage;
UINT BindFlags;
UINT CPUAccessFlags;
UINT MiscFlags;
} D3D11_TEXTURE1D_DESC;
Members
Width
Type: UINT
Texture width (in texels). The range is from 1 to D3D11_REQ_TEXTURE1D_U_DIMENSION (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.
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.
ArraySize
Type: UINT
Number of textures in the array. The range is from 1 to D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.
Format
Type: DXGI_FORMAT
Texture format (see DXGI_FORMAT).
Usage
Type: D3D11_USAGE
Value that identifies how the texture is to be read from and written to. The most common value is D3D11_USAGE_DEFAULT; see D3D11_USAGE for all possible values.
BindFlags
Type: UINT
Flags (see D3D11_BIND_FLAG) for binding to pipeline stages. The flags can be combined by a bitwise OR. For a 1D texture, the allowable values are: D3D11_BIND_SHADER_RESOURCE, D3D11_BIND_RENDER_TARGET and D3D11_BIND_DEPTH_STENCIL.
CPUAccessFlags
Type: UINT
Flags (see D3D11_CPU_ACCESS_FLAG) to specify the types of CPU access allowed. Use 0 if CPU access is not required. These flags can be combined with a bitwise OR.
MiscFlags
Type: UINT
Flags (see D3D11_RESOURCE_MISC_FLAG) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined with a bitwise OR.
Remarks
This structure is used in a call to ID3D11Device::CreateTexture1D.
In addition to this structure, you can also use the CD3D11_TEXTURE1D_DESC derived structure, which is defined in D3D11.h and behaves like an inherited class, to help create a texture description.
The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D 10 hardware at feature level 10 (D3D_FEATURE_LEVEL_10_0) and call D3D11CreateDevice to create an ID3D11Device, you must constrain the maximum texture size to D3D10_REQ_TEXTURE1D_U_DIMENSION (8192) when you create your 1D texture.
Requirements
Requirement | Value |
---|---|
Header | d3d11.h |