The VertexTypes.h header defines these commonly used vertex data structures:
Each type also provides a D3D11_INPUT_ELEMENT_DESC array which can be used to create a matching input layout, for example:
- VertexPositionColor
- VertexPositionTexture
- VertexPositionNormal
- VertexPositionColorTexture
- VertexPositionNormalColor
- VertexPositionNormalTexture
- VertexPositionNormalColorTexture
Each type also provides a D3D11_INPUT_ELEMENT_DESC array which can be used to create a matching input layout, for example:
device->CreateInputLayout(VertexPositionColorTexture::InputElements,
VertexPositionColorTexture::InputElementCount,
vertexShaderCode, vertexShaderCodeSize,
&inputLayout);