VertexBuffer.GetData Generic Method (T )

Gets a copy of the vertex buffer data.

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

Syntax

public void GetData<T> (
         T[] data
) where T : ValueType

Type Parameters

  • T
    The type of data in the vertex buffer.

Parameters

  • data
    The array into which to copy the vertex buffer data.

Exceptions

Exception type Condition
ArgumentNullException data must be of sufficient length to receive the data.
NotSupportedException This VertexBuffer was created with a usage type of ResourceUsage.WriteOnly. Calling GetData on a resource that was created with ResourceUsage.WriteOnly is not supported.

See Also

Reference

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista