RenderWare::VertexElement struct

Defines the vertex data layout. Each vertex can contain one or more data types, and each data type is described by a vertex element.

Constructors, destructors, conversion operators

VertexElement()
VertexElement(uint16_t stream, uint16_t offset, char type, char method, char usage, char usageIndex, int rwDecl)

Public variables

uint16_t stream
Stream number.
uint16_t offset
Offset from the beginning of the vertex data to the data associated with the particular data type.
char type
The data type, specified as a D3DDECLTYPE. One of several predefined types that define the data size. Some methods have an implied type.
char method
The method specifies the tessellator processing, which determines how the tessellator interprets (or operates on) the vertex data. For more information, see D3DDECLMETHOD.
char usage
Defines what the data will be used for; that is, the interoperability between vertex data layouts and vertex shaders.
char usageIndex
Modifies the usage data to allow the user to specify multiple usage types.
int rwDecl

Variable documentation

char RenderWare::VertexElement::usage

Defines what the data will be used for; that is, the interoperability between vertex data layouts and vertex shaders.

Each usage acts to bind a vertex declaration to a vertex shader. In some cases, they have a special interpretation. For example, an element that specifies D3DDECLUSAGE_NORMAL or D3DDECLUSAGE_POSITION is used by the N - patch tessellator to set up tessellation. See D3DDECLUSAGE for a list of the available semantics. D3DDECLUSAGE_TEXCOORD can be used for user - defined fields (which don't have an existing usage defined).