Share via


VertexDeclaration Constructor (VertexElement )

Creates an instance of this object.

Syntax

'Declaration
Public Sub New ( _
         elements As VertexElement() _
)
public VertexDeclaration (
         params VertexElement[] elements
)
public:
VertexDeclaration(
         params VertexElement elements[]
)

Parameters

Exceptions

Exception type Condition
NotSupportedException One or more of the following is true:
  • The vertex stride and the vertex element offset must be multiples of four.
  • The first element does not fit within the specified vertex stride.
  • Duplicate elements.
  • The first and second elements overlap.
  • The profile supports a maximum vertex stride of 255.
  • The profile supports a maximum of 16 simultaneous vertex elements.
  • The profile does not support the format requested.
OutOfMemoryException There is not enough memory to create this resource.

Requirements

Namespace: Microsoft.Xna.Framework.Graphics

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

See Also

Reference

VertexDeclaration Class
VertexDeclaration Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows Phone