Struct D3D11InputElementDesc
A description of a single element for the input-assembler stage.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11InputElementDesc : IEquatable<D3D11InputElementDesc>
Constructors
| Edit this page View SourceD3D11InputElementDesc(ReadOnlySpan<byte>, uint, DxgiFormat, uint, uint, D3D11InputClassification, uint)
Initializes a new instance of the D3D11InputElementDesc struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
public D3D11InputElementDesc(ReadOnlySpan<byte> semanticName, uint semanticIndex, DxgiFormat format, uint inputSlot, uint alignedByteOffset, D3D11InputClassification inputSlotClass, uint instanceDataStepRate)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | semanticName | The HLSL semantic associated with this element in a shader input-signature. |
| uint | semanticIndex | The semantic index for the element. |
| DxgiFormat | format | The data type of the element data. |
| uint | inputSlot | An integer value that identifies the input-assembler. |
| uint | alignedByteOffset | Offset (in bytes) between each element. Optional. |
| D3D11InputClassification | inputSlotClass | Identifies the input data class for a single input slot. |
| uint | instanceDataStepRate | The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data. |
D3D11InputElementDesc(ReadOnlySpan<char>, uint, DxgiFormat, uint, uint, D3D11InputClassification, uint)
Initializes a new instance of the D3D11InputElementDesc struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
public D3D11InputElementDesc(ReadOnlySpan<char> semanticName, uint semanticIndex, DxgiFormat format, uint inputSlot, uint alignedByteOffset, D3D11InputClassification inputSlotClass, uint instanceDataStepRate)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | semanticName | The HLSL semantic associated with this element in a shader input-signature. |
| uint | semanticIndex | The semantic index for the element. |
| DxgiFormat | format | The data type of the element data. |
| uint | inputSlot | An integer value that identifies the input-assembler. |
| uint | alignedByteOffset | Offset (in bytes) between each element. Optional. |
| D3D11InputClassification | inputSlotClass | Identifies the input data class for a single input slot. |
| uint | instanceDataStepRate | The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data. |
D3D11InputElementDesc(string, uint, DxgiFormat, uint, uint, D3D11InputClassification, uint)
Initializes a new instance of the D3D11InputElementDesc struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
public D3D11InputElementDesc(string semanticName, uint semanticIndex, DxgiFormat format, uint inputSlot, uint alignedByteOffset, D3D11InputClassification inputSlotClass, uint instanceDataStepRate)
Parameters
| Type | Name | Description |
|---|---|---|
| string | semanticName | The HLSL semantic associated with this element in a shader input-signature. |
| uint | semanticIndex | The semantic index for the element. |
| DxgiFormat | format | The data type of the element data. |
| uint | inputSlot | An integer value that identifies the input-assembler. |
| uint | alignedByteOffset | Offset (in bytes) between each element. Optional. |
| D3D11InputClassification | inputSlotClass | Identifies the input data class for a single input slot. |
| uint | instanceDataStepRate | The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data. |
Fields
| Edit this page View SourceSemanticNameMaxLength
Gets the maximum char count of the string that contains the semantic name.
Declaration
public const int SemanticNameMaxLength = 64
Field Value
| Type | Description |
|---|---|
| int |
Properties
| Edit this page View SourceAlignedByteOffset
Gets or sets the offset (in bytes) between each element. Optional.
Declaration
public uint AlignedByteOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
Format
Gets or sets the data type of the element data.
Declaration
public DxgiFormat Format { get; set; }
Property Value
| Type | Description |
|---|---|
| DxgiFormat |
InputSlot
Gets or sets an integer value that identifies the input-assembler.
Declaration
public uint InputSlot { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
InputSlotClass
Gets or sets the input data class for a single input slot.
Declaration
public D3D11InputClassification InputSlotClass { get; set; }
Property Value
| Type | Description |
|---|---|
| D3D11InputClassification |
InstanceDataStepRate
Gets or sets the number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data.
Declaration
public uint InstanceDataStepRate { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
SemanticIndex
Gets or sets the semantic index for the element.
Declaration
public uint SemanticIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
SemanticName
Gets or sets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public string SemanticName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceEquals(D3D11InputElementDesc)
Declaration
public readonly bool Equals(D3D11InputElementDesc other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11InputElementDesc | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceGetSemanticNameAsSpan()
Gets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public ReadOnlySpan<byte> GetSemanticNameAsSpan()
Returns
| Type | Description |
|---|---|
| ReadOnlySpan<byte> |
GetSemanticNameCharCount()
Gets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public int GetSemanticNameCharCount()
Returns
| Type | Description |
|---|---|
| int | The count. |
GetSemanticNameChars(Span<char>)
Gets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public int GetSemanticNameChars(Span<char> text)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<char> | text |
Returns
| Type | Description |
|---|---|
| int |
NativeReadFrom(nint)
Declaration
public static D3D11InputElementDesc NativeReadFrom(nint buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer |
Returns
| Type | Description |
|---|---|
| D3D11InputElementDesc |
NativeReadFrom(nint, Span<D3D11InputElementDesc>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11InputElementDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| Span<D3D11InputElementDesc> | objects |
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
| Type | Description |
|---|---|
| int |
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count |
Returns
| Type | Description |
|---|---|
| int |
NativeWriteTo(nint, in D3D11InputElementDesc)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11InputElementDesc obj)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| D3D11InputElementDesc | obj |
NativeWriteTo(nint, ReadOnlySpan<D3D11InputElementDesc>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11InputElementDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| ReadOnlySpan<D3D11InputElementDesc> | objects |
SetSemanticName(ReadOnlySpan<byte>)
Sets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public void SetSemanticName(ReadOnlySpan<byte> value)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | value |
SetSemanticName(ReadOnlySpan<char>)
Sets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public void SetSemanticName(ReadOnlySpan<char> value)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<char> | value |
SetSemanticName(string)
Sets the HLSL semantic associated with this element in a shader input-signature.
Declaration
public void SetSemanticName(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Operators
| Edit this page View Sourceoperator ==(D3D11InputElementDesc, D3D11InputElementDesc)
Declaration
public static bool operator ==(D3D11InputElementDesc left, D3D11InputElementDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11InputElementDesc | left | |
| D3D11InputElementDesc | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11InputElementDesc, D3D11InputElementDesc)
Declaration
public static bool operator !=(D3D11InputElementDesc left, D3D11InputElementDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11InputElementDesc | left | |
| D3D11InputElementDesc | right |
Returns
| Type | Description |
|---|---|
| bool |