Struct TextureDescription
A Common description for all textures.
public struct TextureDescription : IEquatable<TextureDescription>
- Implements
- Inherited Members
- Extension Methods
Remarks
This class exposes the union of all fields exposed by fields in SharpDX.Direct3D11.Texture1DDescription, SharpDX.Direct3D11.Texture2DDescription, SharpDX.Direct3D11.Texture3DDescription. It provides also 2-way implicit conversions for 1D, 2D, 3D textures descriptions.
Fields
ArraySize
Number of textures in the array. The range is from 1 to SharpDX.Direct3D11.Resource.MaximumTexture1DArraySize (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.
public int ArraySize
Field Value
Remarks
This field is only valid for Texture1D, Texture2D and TextureCube
BindFlags
Flags (see SharpDX.Direct3D11.BindFlags) for binding to pipeline stages. The flags can be combined by a logical OR. For a 1D texture, the allowable values are: SharpDX.Direct3D11.BindFlags.ShaderResource, SharpDX.Direct3D11.BindFlags.RenderTarget and SharpDX.Direct3D11.BindFlags.DepthStencil.
public BindFlags BindFlags
Field Value
- BindFlags
CpuAccessFlags
Flags (see SharpDX.Direct3D11.CpuAccessFlags) 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.
public CpuAccessFlags CpuAccessFlags
Field Value
- CpuAccessFlags
Depth
Texture depth (in texels). The range is from 1 to SharpDX.Direct3D11.Resource.MaximumTexture3DSize (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.
public int Depth
Field Value
Remarks
This field is only valid for Texture3D.
Dimension
The dimension of a texture.
public TextureDimension Dimension
Field Value
Format
Texture format (see SharpDX.DXGI.Format).
public Format Format
Field Value
- Format
Height
Texture height (in texels). The range is from 1 to SharpDX.Direct3D11.Resource.MaximumTexture3DSize (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.
public int Height
Field Value
Remarks
This field is only valid for Texture2D, Texture3D and TextureCube.
MipLevels
The maximum number of mipmap levels in the texture. See the remarks in SharpDX.Direct3D11.ShaderResourceViewDescription.Texture1DResource. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.
public int MipLevels
Field Value
OptionFlags
Flags (see SharpDX.Direct3D11.ResourceOptionFlags) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined with a logical OR.
public ResourceOptionFlags OptionFlags
Field Value
- ResourceOptionFlags
SampleDescription
Structure that specifies multisampling parameters for the texture. See SharpDX.DXGI.SampleDescription.
public SampleDescription SampleDescription
Field Value
- SampleDescription
Remarks
This field is only valid for Texture2D.
Usage
Value that identifies how the texture is to be read from and written to. The most common value is SharpDX.Direct3D11.ResourceUsage.Default; see SharpDX.Direct3D11.ResourceUsage for all possible values.
public ResourceUsage Usage
Field Value
- ResourceUsage
Width
Texture width (in texels). The range is from 1 to SharpDX.Direct3D11.Resource.MaximumTexture1DSize (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.
public int Width
Field Value
Remarks
This field is valid for all textures: Texture1D, Texture2D, Texture3D and TextureCube.
Methods
Equals(TextureDescription)
public bool Equals(TextureDescription other)
Parameters
otherTextureDescription
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToStagingDescription()
Gets the staging description for this instance..
public TextureDescription ToStagingDescription()
Returns
- TextureDescription
A Staging description
Operators
operator ==(TextureDescription, TextureDescription)
public static bool operator ==(TextureDescription left, TextureDescription right)
Parameters
leftTextureDescriptionrightTextureDescription
Returns
implicit operator TextureDescription(Texture1DDescription)
Performs an explicit conversion from SharpDX.Direct3D11.Texture2DDescription to TextureDescription.
public static implicit operator TextureDescription(Texture1DDescription description)
Parameters
descriptionTexture1DDescriptionThe texture description.
Returns
- TextureDescription
The result of the conversion.
implicit operator TextureDescription(Texture2DDescription)
Performs an explicit conversion from SharpDX.Direct3D11.Texture2DDescription to TextureDescription.
public static implicit operator TextureDescription(Texture2DDescription description)
Parameters
descriptionTexture2DDescriptionThe texture description.
Returns
- TextureDescription
The result of the conversion.
implicit operator TextureDescription(Texture3DDescription)
Performs an explicit conversion from SharpDX.Direct3D11.Texture2DDescription to TextureDescription.
public static implicit operator TextureDescription(Texture3DDescription description)
Parameters
descriptionTexture3DDescriptionThe texture description.
Returns
- TextureDescription
The result of the conversion.
implicit operator TextureDescription(ImageDescription)
Performs an explicit conversion from ImageDescription to TextureDescription.
public static implicit operator TextureDescription(ImageDescription description)
Parameters
descriptionImageDescriptionThe image description.
Returns
- TextureDescription
The result of the conversion.
implicit operator Texture1DDescription(TextureDescription)
Performs an explicit conversion from TextureDescription to SharpDX.Direct3D11.Texture2DDescription.
public static implicit operator Texture1DDescription(TextureDescription description)
Parameters
descriptionTextureDescriptionThe texture description.
Returns
- Texture1DDescription
The result of the conversion.
implicit operator Texture2DDescription(TextureDescription)
Performs an explicit conversion from TextureDescription to SharpDX.Direct3D11.Texture2DDescription.
public static implicit operator Texture2DDescription(TextureDescription description)
Parameters
descriptionTextureDescriptionThe texture description.
Returns
- Texture2DDescription
The result of the conversion.
implicit operator Texture3DDescription(TextureDescription)
Performs an explicit conversion from TextureDescription to SharpDX.Direct3D11.Texture3DDescription.
public static implicit operator Texture3DDescription(TextureDescription description)
Parameters
descriptionTextureDescriptionThe texture description.
Returns
- Texture3DDescription
The result of the conversion.
implicit operator ImageDescription(TextureDescription)
Performs an explicit conversion from ImageDescription to TextureDescription.
public static implicit operator ImageDescription(TextureDescription description)
Parameters
descriptionTextureDescriptionThe image description.
Returns
- ImageDescription
The result of the conversion.
operator !=(TextureDescription, TextureDescription)
public static bool operator !=(TextureDescription left, TextureDescription right)
Parameters
leftTextureDescriptionrightTextureDescription