Export (0) Print
Expand All
Expand Minimize

VertexElementFormat Enumeration

Defines vertex element formats.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

public enum VertexElementFormat

 Member nameDescription
Single Single-component, 32-bit floating-point, expanded to (float, 0, 0, 1).
Vector2 Two-component, 32-bit floating-point, expanded to (float, Float32 value, 0, 1).
Vector3 Three-component, 32-bit floating point, expanded to (float, float, float, 1).
Vector4 Four-component, 32-bit floating point, expanded to (float, float, float, float).
HalfVector2 Two-component, 16-bit floating point expanded to (value, value, value, value). This type is valid for vertex shader version 2.0 or higher.
HalfVector4 Four-component, 16-bit floating-point expanded to (value, value, value, value). This type is valid for vertex shader version 2.0 or higher.
Color Four-component, packed, unsigned byte, mapped to 0 to 1 range. Input is in Int32 format (ARGB) expanded to (R, G, B, A).
NormalizedShort2 Normalized, two-component, signed short, expanded to (first short/32767.0, second short/32767.0, 0, 1). This type is valid for vertex shader version 2.0 or higher.
NormalizedShort4 Normalized, four-component, signed short, expanded to (first short/32767.0, second short/32767.0, third short/32767.0, fourth short/32767.0). This type is valid for vertex shader version 2.0 or higher.
Short2 Two-component, signed short expanded to (value, value, 0, 1).
Short4 Four-component, signed short expanded to (value, value, value, value).
Byte4 Four-component, unsigned byte.

A mapping of each Direct3D 9 format name to the VertexElementFormat equivalent is listed in the following table.

 Direct3D 9 Vertex Format VertexElementFormat equivalent
Floating Point
Float32D3DDECLTYPE_FLOAT1Single
D3DDECLTYPE_FLOAT2Vector2
D3DDECLTYPE_FLOAT3Vector3
D3DDECLTYPE_FLOAT4Vector4
Float16D3DDECLTYPE_FLOAT16_2HalfVector2
D3DDECLTYPE_FLOAT16_4HalfVector4
Unsigned Normalized
64 bppD3DDECLTYPE_USHORT4NRgba64
32 bppD3DDECLTYPE_D3DCOLORColor
D3DDECLTYPE_UBYTE4NRgba32
D3DDECLTYPE_USHORT2NRg32
Signed Normalized
 D3DDECLTYPE_SHORT2NNormalizedShort2
D3DDECLTYPE_SHORT4NNormalizedShort4
D3DDECLTYPE_DEC3NNormalized101010
Signed Integer
 D3DDECLTYPE_SHORT2Short2
D3DDECLTYPE_SHORT4Short4
Unsigned Integer
 D3DDECLTYPE_UBYTE4Byte4
D3DDECLTYPE_UDEC3UInt101010

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7

Community Additions

ADD
Show:
© 2014 Microsoft