Struct D3D11Texture2DDesc
Describes a 2D texture.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11Texture2DDesc : IEquatable<D3D11Texture2DDesc>
Constructors
| Edit this page View SourceD3D11Texture2DDesc(DxgiFormat, uint, uint)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint, D3D11BindOptions)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels, D3D11BindOptions bindOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
| D3D11BindOptions | bindOptions | Options for binding to pipeline stages. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint, D3D11BindOptions, D3D11Usage)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels, D3D11BindOptions bindOptions, D3D11Usage usage)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
| D3D11BindOptions | bindOptions | Options for binding to pipeline stages. |
| D3D11Usage | usage | Identifies how the texture is to be read from and written to. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
| D3D11BindOptions | bindOptions | Options for binding to pipeline stages. |
| D3D11Usage | usage | Identifies how the texture is to be read from and written to. |
| D3D11CpuAccessOptions | cpuAccessOptions | Options to specify the types of CPU access allowed. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions, uint, uint)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions, uint sampleCount, uint sampleQuality)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
| D3D11BindOptions | bindOptions | Options for binding to pipeline stages. |
| D3D11Usage | usage | Identifies how the texture is to be read from and written to. |
| D3D11CpuAccessOptions | cpuAccessOptions | Options to specify the types of CPU access allowed. |
| uint | sampleCount | The sample count. |
| uint | sampleQuality | The sample quality. |
D3D11Texture2DDesc(DxgiFormat, uint, uint, uint, uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions, uint, uint, D3D11ResourceMiscOptions)
Initializes a new instance of the D3D11Texture2DDesc struct.
Declaration
public D3D11Texture2DDesc(DxgiFormat format, uint width, uint height, uint arraySize, uint mipLevels, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions, uint sampleCount, uint sampleQuality, D3D11ResourceMiscOptions miscOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiFormat | format | The texture format. |
| uint | width | The texture width (in texels). |
| uint | height | The texture height (in texels). |
| uint | arraySize | The number of textures in the texture array. |
| uint | mipLevels | The maximum number of mipmap levels in the texture. |
| D3D11BindOptions | bindOptions | Options for binding to pipeline stages. |
| D3D11Usage | usage | Identifies how the texture is to be read from and written to. |
| D3D11CpuAccessOptions | cpuAccessOptions | Options to specify the types of CPU access allowed. |
| uint | sampleCount | The sample count. |
| uint | sampleQuality | The sample quality. |
| D3D11ResourceMiscOptions | miscOptions | Options that identify other, less common resource options. |
Properties
| Edit this page View SourceArraySize
Gets or sets the number of textures in the texture array.
Declaration
public uint ArraySize { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
BindOptions
Gets or sets options for binding to pipeline stages.
Declaration
public D3D11BindOptions BindOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11BindOptions |
CpuAccessOptions
Gets or sets options to specify the types of CPU access allowed.
Declaration
public D3D11CpuAccessOptions CpuAccessOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11CpuAccessOptions |
Format
Gets or sets the texture format.
Declaration
public DxgiFormat Format { get; set; }
Property Value
| Type | Description |
|---|---|
| DxgiFormat |
Height
Gets or sets the texture height (in texels).
Declaration
public uint Height { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
MipLevels
Gets or sets the maximum number of mipmap levels in the texture.
Declaration
public uint MipLevels { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
MiscOptions
Gets or sets options that identify other, less common resource options.
Declaration
public D3D11ResourceMiscOptions MiscOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11ResourceMiscOptions |
SampleDesc
Gets or sets the multisampling parameters for the texture.
Declaration
public DxgiSampleDesc SampleDesc { get; set; }
Property Value
| Type | Description |
|---|---|
| DxgiSampleDesc |
Usage
Gets or sets a value indicating how the texture is to be read from and written to.
Declaration
public D3D11Usage Usage { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11Usage |
Width
Gets or sets the texture width (in texels).
Declaration
public uint Width { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
| Edit this page View SourceEquals(D3D11Texture2DDesc)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D3D11Texture2DDesc other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2DDesc | other | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(D3D11Texture2DDesc, D3D11Texture2DDesc)
Compares two D3D11Texture2DDesc objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D3D11Texture2DDesc left, D3D11Texture2DDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2DDesc | left | The left D3D11Texture2DDesc to compare. |
| D3D11Texture2DDesc | right | The right D3D11Texture2DDesc to compare. |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11Texture2DDesc, D3D11Texture2DDesc)
Compares two D3D11Texture2DDesc objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D3D11Texture2DDesc left, D3D11Texture2DDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2DDesc | left | The left D3D11Texture2DDesc to compare. |
| D3D11Texture2DDesc | right | The right D3D11Texture2DDesc to compare. |
Returns
| Type | Description |
|---|---|
| bool |