D3D10_INPUT_ELEMENT_DESC structure (d3d10.h)
A description of a single element for the input-assembler stage.
Syntax
typedef struct D3D10_INPUT_ELEMENT_DESC {
LPCSTR SemanticName;
UINT SemanticIndex;
DXGI_FORMAT Format;
UINT InputSlot;
UINT AlignedByteOffset;
D3D10_INPUT_CLASSIFICATION InputSlotClass;
UINT InstanceDataStepRate;
} D3D10_INPUT_ELEMENT_DESC;
Members
SemanticName
Type: LPCSTR
The HLSL semantic associated with this element in a shader input-signature.
SemanticIndex
Type: UINT
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 component would have different semantic indices (0, 1, 2, and 3).
Format
Type: DXGI_FORMAT
The data type of the element data. See DXGI_FORMAT.
InputSlot
Type: UINT
An integer value that identifies the input-assembler (see input slot). Valid values are between 0 and 15, defined in D3D10.h.
AlignedByteOffset
Type: UINT
Optional. Offset (in bytes) between each element. Use D3D10_APPEND_ALIGNED_ELEMENT for convenience to define the current element directly after the previous one, including any packing if necessary.
InputSlotClass
Type: D3D10_INPUT_CLASSIFICATION
Identifies the input data class for a single input slot (see D3D10_INPUT_CLASSIFICATION).
InstanceDataStepRate
Type: UINT
The number of instances to draw before stepping one unit forward in a vertex buffer filled with instance data. Can be any unsigned integer value (0 means do not step) when the slot class is D3D10_INPUT_PER_INSTANCE_DATA; must be 0 when the slot class is D3D10_INPUT_PER_VERTEX_DATA.
Remarks
An input-layout object contains an array of structures, each structure defines one element being read from an input slot. Create an input-layout object by calling ID3D10Device::CreateInputLayout. For an example, see Create an input-layout object.
Requirements
Requirement | Value |
---|---|
Header | d3d10.h |