Struct InputElement
A description of a single element to the vertex layout.
public struct InputElement
- Inherited Members
Remarks
This structure is a subset of
If the D2D1_APPEND_ALIGNED_ELEMENT constant is used for alignedByteOffset, the elements will be packed contiguously for convenience.
Constructors
InputElement(string, int, Format, int)
Initializes a new instance of the SharpDX.Direct2D11.InputElement struct.
public InputElement(string name, int index, Format format, int slot)
Parameters
name
stringThe HLSL semantic associated with this element in a shader input-signature.
index
intThe semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3).
format
FormatThe data type of the element data.
slot
intAn integer value that identifies the input-assembler. Valid values are between 0 and 15.
InputElement(string, int, Format, int, int)
Initializes a new instance of the SharpDX.Direct2D11.InputElement struct.
public InputElement(string name, int index, Format format, int offset, int slot)
Parameters
name
stringThe HLSL semantic associated with this element in a shader input-signature.
index
intThe semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix, however each of the four component would have different semantic indices (0, 1, 2, and 3).
format
FormatThe data type of the element data.
offset
intOffset (in bytes) between each element. Use AppendAligned for convenience to define the current element directly after the previous one, including any packing if necessary.
slot
intAn integer value that identifies the input-assembler. Valid values are between 0 and 15.
Fields
AlignedByteOffset
The offset in bytes between each element.
public int AlignedByteOffset
Field Value
Format
The data type of the element data.
public Format Format
Field Value
- Format
SemanticIndex
The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix; however, each of the four components would have different semantic indices (0, 1, 2, and 3).
public int SemanticIndex
Field Value
SemanticName
The HLSL semantic associated with this element in a shader input-signature.
public string SemanticName
Field Value
Slot
An integer value that identifies the input-assembler. Valid values are between 0 and 15.
public int Slot
Field Value
Properties
AppendAligned
Returns a value that can be used for the offset parameter of an InputElement to indicate that the element should be aligned directly after the previous element, including any packing if necessary.
public static int AppendAligned { get; }
Property Value
- int
A value used to align input elements.
Methods
Equals(InputElement)
Determines whether the specified InputElement is equal to this instance.
public bool Equals(InputElement other)
Parameters
other
InputElementThe InputElement to compare with this instance.
Returns
- bool
true
if the specified InputElement is equal to this instance; otherwise,false
.
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(InputElement, InputElement)
Implements the operator ==.
public static bool operator ==(InputElement left, InputElement right)
Parameters
left
InputElementThe left.
right
InputElementThe right.
Returns
- bool
The result of the operator.
operator !=(InputElement, InputElement)
Implements the operator !=.
public static bool operator !=(InputElement left, InputElement right)
Parameters
left
InputElementThe left.
right
InputElementThe right.
Returns
- bool
The result of the operator.