Struct D3D11ShaderResourceViewDesc
Describes a shader resource view.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11ShaderResourceViewDesc : IEquatable<D3D11ShaderResourceViewDesc>
Constructors
| Edit this page View SourceD3D11ShaderResourceViewDesc(D3D11Buffer, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Buffer buffer, DxgiFormat format, uint firstElement, uint numElements)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | buffer | A buffer. |
DxgiFormat | format | The viewing format. |
uint | firstElement | The number of bytes between the beginning of the buffer and the first element to access. |
uint | numElements | The total number of elements in the view. |
D3D11ShaderResourceViewDesc(D3D11Buffer, DxgiFormat, uint, uint, D3D11BufferExSrvOptions)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Buffer buffer, DxgiFormat format, uint firstElement, uint numElements, D3D11BufferExSrvOptions options)
Parameters
Type | Name | Description |
---|---|---|
D3D11Buffer | buffer | A buffer. |
DxgiFormat | format | The viewing format. |
uint | firstElement | The number of bytes between the beginning of the buffer and the first element to access. |
uint | numElements | The total number of elements in the view. |
D3D11BufferExSrvOptions | options | The view options for a buffer. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | Index of the most detailed mipmap level to use. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | Index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | Index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat, uint, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice, uint arraySize)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | Index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
uint | arraySize | The number of elements in the array. |
D3D11ShaderResourceViewDesc(D3D11SrvDimension, DxgiFormat, uint, uint, uint, uint, D3D11BufferExSrvOptions)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice, uint arraySize, D3D11BufferExSrvOptions bufferExOptions)
Parameters
Type | Name | Description |
---|---|---|
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | Index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
uint | arraySize | The number of elements in the array. |
D3D11BufferExSrvOptions | bufferExOptions | The view options for a buffer |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension, DxgiFormat)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension, DxgiFormat format)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11ShaderResourceViewDesc(D3D11Texture1D, D3D11SrvDimension, DxgiFormat, uint, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture1D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice, uint arraySize)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1D | texture | A 1D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
uint | arraySize | The number of elements in the array. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension, DxgiFormat)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension, DxgiFormat format)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension, DxgiFormat, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension, DxgiFormat, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
D3D11ShaderResourceViewDesc(D3D11Texture2D, D3D11SrvDimension, DxgiFormat, uint, uint, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture2D texture, D3D11SrvDimension viewDimension, DxgiFormat format, uint mostDetailedMip, uint mipLevels, uint firstArraySlice, uint arraySize)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2D | texture | A 2D texture. |
D3D11SrvDimension | viewDimension | The resource type of the view. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
uint | firstArraySlice | The index of the first element to use in an array of elements. |
uint | arraySize | The number of elements in the array. |
D3D11ShaderResourceViewDesc(D3D11Texture3D)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture3D texture)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3D | texture | A 3D texture. |
D3D11ShaderResourceViewDesc(D3D11Texture3D, DxgiFormat)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture3D texture, DxgiFormat format)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3D | texture | A 3D texture. |
DxgiFormat | format | The viewing format. |
D3D11ShaderResourceViewDesc(D3D11Texture3D, DxgiFormat, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture3D texture, DxgiFormat format, uint mostDetailedMip)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3D | texture | A 3D texture. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
D3D11ShaderResourceViewDesc(D3D11Texture3D, DxgiFormat, uint, uint)
Initializes a new instance of the D3D11ShaderResourceViewDesc struct.
Declaration
public D3D11ShaderResourceViewDesc(D3D11Texture3D texture, DxgiFormat format, uint mostDetailedMip, uint mipLevels)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3D | texture | A 3D texture. |
DxgiFormat | format | The viewing format. |
uint | mostDetailedMip | The index of the most detailed mipmap level to use. |
uint | mipLevels | The maximum number of mipmap levels for the view. |
Properties
| Edit this page View SourceBuffer
Gets or sets the resource as a buffer using information from a shader resource view.
Declaration
public D3D11BufferSrv Buffer { get; set; }
Property Value
Type | Description |
---|---|
D3D11BufferSrv |
BufferEx
Gets or sets the resource as a raw buffer using information from a shader resource view.
Declaration
public D3D11BufferExSrv BufferEx { get; set; }
Property Value
Type | Description |
---|---|
D3D11BufferExSrv |
Format
Gets or sets the viewing format.
Declaration
public DxgiFormat Format { get; set; }
Property Value
Type | Description |
---|---|
DxgiFormat |
Texture1D
Gets or sets the resource as a 1D texture using information from a shader resource view.
Declaration
public D3D11Texture1DSrv Texture1D { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture1DSrv |
Texture1DArray
Gets or sets the resource as a 1D-texture array using information from a shader resource view.
Declaration
public D3D11Texture1DArraySrv Texture1DArray { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture1DArraySrv |
Texture2D
Gets or sets the resource as a 2D-texture using information from a shader resource view.
Declaration
public D3D11Texture2DSrv Texture2D { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture2DSrv |
Texture2DArray
Gets or sets the resource as a 2D-texture array using information from a shader resource view.
Declaration
public D3D11Texture2DArraySrv Texture2DArray { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture2DArraySrv |
Texture2DMs
Gets or sets the resource as a 2D-multisampled texture using information from a shader resource view.
Declaration
public D3D11Texture2DMsSrv Texture2DMs { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture2DMsSrv |
Texture2DMsArray
Gets or sets the resource as a 2D-multisampled-texture array using information from a shader resource view.
Declaration
public D3D11Texture2DMsArraySrv Texture2DMsArray { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture2DMsArraySrv |
Texture3D
Gets or sets the resource as a 3D texture using information from a shader resource view.
Declaration
public D3D11Texture3DSrv Texture3D { get; set; }
Property Value
Type | Description |
---|---|
D3D11Texture3DSrv |
TextureCube
Gets or sets the resource as a 3D-cube texture using information from a shader resource view.
Declaration
public D3D11TextureCubeSrv TextureCube { get; set; }
Property Value
Type | Description |
---|---|
D3D11TextureCubeSrv |
TextureCubeArray
Gets or sets the resource as a 3D-cube-texture array using information from a shader resource view.
Declaration
public D3D11TextureCubeArraySrv TextureCubeArray { get; set; }
Property Value
Type | Description |
---|---|
D3D11TextureCubeArraySrv |
ViewDimension
Gets or sets the resource type of the view.
Declaration
public D3D11SrvDimension ViewDimension { get; set; }
Property Value
Type | Description |
---|---|
D3D11SrvDimension |
Methods
| Edit this page View SourceEquals(D3D11ShaderResourceViewDesc)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D3D11ShaderResourceViewDesc other)
Parameters
Type | Name | Description |
---|---|---|
D3D11ShaderResourceViewDesc | 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 ==(D3D11ShaderResourceViewDesc, D3D11ShaderResourceViewDesc)
Compares two D3D11ShaderResourceViewDesc objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D3D11ShaderResourceViewDesc left, D3D11ShaderResourceViewDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11ShaderResourceViewDesc | left | The left D3D11ShaderResourceViewDesc to compare. |
D3D11ShaderResourceViewDesc | right | The right D3D11ShaderResourceViewDesc to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D3D11ShaderResourceViewDesc, D3D11ShaderResourceViewDesc)
Compares two D3D11ShaderResourceViewDesc objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D3D11ShaderResourceViewDesc left, D3D11ShaderResourceViewDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11ShaderResourceViewDesc | left | The left D3D11ShaderResourceViewDesc to compare. |
D3D11ShaderResourceViewDesc | right | The right D3D11ShaderResourceViewDesc to compare. |
Returns
Type | Description |
---|---|
bool |