VertexDeclaration Constructor (VertexElement[])

VertexDeclaration Constructor (VertexElement[])

XNA Game Studio 4.0
Creates an instance of this object.

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

public VertexDeclaration (
         params VertexElement[] elements
)

Parameters

elements
[ParamArrayAttribute] An array of per-vertex elements.

Exception typeCondition
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.
OutOfMemoryExceptionThere is not enough memory to create this resource.

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

Community Additions

ADD
Show:
© 2016 Microsoft