The D3D11_TEXTURE1D_DESC structure describes a 1D texture.
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;
The width of the texture (in texels). The range is from 1 to D3D11_REQ_TEXTURE1D_U_DIMENSION (16384).
The minimum number of mipmap levels in the texture. See Mipmap Levels for more info.
The number of layers in the texture array. The range is from 1 to D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION (2048).
A DXGI_FORMAT-typed value that specifies the surface format.
A D3D11_USAGE-typed value that specifies how the texture will be used. Values must be one of the D3D11_USAGE enumerated types.
A combination of D3D11_BIND_FLAG-typed values that specify how the texture will be bound to the pipeline.
A combination of D3D11_CPU_ACCESS_FLAG-typed values that specify the CPU's random access methods to the texture.
A combination of D3D11_RESOURCE_MISC_FLAG-typed values that identify other, miscellaneous resource settings.
This structure is a member of D3D11_TEXTURE1D_DESC and is used by the following functions:
To create a texture, pass a pointer to this structure to the CreateTexture1D function.
Note
A typical texture has MipLevels set to 0 to generate all the mipmap levels automatically. The number of mipmap levels is calculated by the following formula:
floor(log2(Width)) + 1
Header | d3d11.h (include d3d11.h) |
Library | D3d11.lib |