CD3D10_TEXTURE2D_DESC structure (d3d10.h)

Describes a 2D texture.

Syntax

struct CD3D10_TEXTURE2D_DESC : D3D10_TEXTURE2D_DESC {
  void CD3D10_TEXTURE2D_DESC();
  void CD3D10_TEXTURE2D_DESC(
    const D3D10_TEXTURE2D_DESC & o
  );
  void CD3D10_TEXTURE2D_DESC(
    DXGI_FORMAT format,
    UINT        width,
    UINT        height,
    UINT        arraySize,
    UINT        mipLevels,
    UINT        bindFlags,
    D3D10_USAGE usage,
    UINT        cpuaccessFlags,
    UINT        sampleCount,
    UINT        sampleQuality,
    UINT        miscFlags
  );
  void ~CD3D10_TEXTURE2D_DESC();
};

Inheritance

The CD3D10_TEXTURE2D_DESC structure implements D3D10_TEXTURE2D_DESC.

Members

void CD3D10_TEXTURE2D_DESC()

void CD3D10_TEXTURE2D_DESC( const D3D10_TEXTURE2D_DESC & o)

void CD3D10_TEXTURE2D_DESC( DXGI_FORMAT format, UINT width, UINT height, UINT arraySize, UINT mipLevels, UINT bindFlags, D3D10_USAGE usage, UINT cpuaccessFlags, UINT sampleCount, UINT sampleQuality, UINT miscFlags)

void ~CD3D10_TEXTURE2D_DESC()

Remarks

format Type: DXGI_FORMAT Texture format (see DXGI_FORMAT).

width Type: UINT Texture width (in texels). The range is from 1 to D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION (8192). For a texture cube-map, the range is from 1 to D3D10_REQ_TEXTURECUBE_DIMENSION (8192). For more information about restrictions, see Remarks.

height Type: UINT Texture height (in texels). The range is from 1 to D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION (8192). For a texture cube-map, the range is from 1 to D3D10_REQ_TEXTURECUBE_DIMENSION (8192). For more information about restrictions, see Remarks.

arraySize Type: UINT Number of textures in the texture array. The range is from 1 to D3D10_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION (512). For a texture cube-map, this value is a multiple of 6 (that is, 6 * the value in the NumCubes member of D3D10_TEXCUBE_ARRAY_SRV1), and the range is from 6 to D3D10_REQ_TEXTURECUBE_DIMENSION.

mipLevels Type: UINT Number of subtextures (also called mipmap levels). Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.

bindFlags Type: UINT Flags (see D3D10_BIND_FLAG) for binding to pipeline stages. The flags can be combined by a logical OR.

usage Type: D3D10_USAGE Value that identifies how the texture is to be read from and written to. The most common value is D3D10_USAGE-DEFAULT; see D3D10_USAGE for all possible values.

cpuAccessFlags Type: UINT Flags (see D3D10_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 logical OR.

sampleCount Type: UINT

sampleQuality Type: UINT

miscFlags Type: UINT Flags (see D3D10_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 logical OR. For a texture cube-map, set the D3D10_RESOURCE_MISC_TEXTURECUBE flag. Cube-map arrays (that is, ArraySize > 6) require feature level D3D_FEATURE_LEVEL_10_1.

This structure is used in a call to ID3D10Device::CreateTexture2D. A helpful derived structure CD3D10_TEXTURE2D_DESC is declared in D3D10.h, to help create a texture description.

The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.

Requirements

Requirement Value
Header d3d10.h

See also

Resource Structures