Export (0) Print
Expand All

VertexDeclaration Constructor

Initializes a new instance of the VertexDeclaration class.

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

public VertexDeclaration (
         GraphicsDevice graphicsDevice,
         VertexElement[] elements


The GraphicsDevice associated with the vertex elements.
An array of vertex elements.

Exception typeCondition
ArgumentNullException graphicsDevice or elements is null.
ArgumentOutOfRangeException elements does not contain any elements, or is too large for the graphics device.
InvalidOperationException Unable to create this VertexDeclaration resource on the graphics device.

VertexDeclaration objects must be recreated when the device is reset.

Xbox 360, Windows XP SP2, Windows Vista

© 2014 Microsoft