VertexBuffer.GetData Generic Method (T )

Gets a copy of the vertex buffer data.

Syntax

'Declaration
Public Sub GetData(Of T As ValueType) ( _
         data As T() _
)
public void GetData<T> (
         T[] data
) where T : ValueType
public:
generic<typename T> where T : ValueType
void GetData(
         T data[]
)

Type Parameters

  • T
    The type of the elements in the array.

Parameters

  • data
    Type: T
    Array of data.

Exceptions

Exception type Condition
ArgumentNullException data is null. data must be of sufficient length to receive the data.
ArgumentOutOfRangeException One of the following conditions is true:
  • The vertex stride is larger than the vertex buffer.
  • The vertex stride is too small for the type of data requested.
InvalidOperationException The array is not the correct size for the amount of data requested.
NotSupportedException This VertexBuffer was created with a usage type of BufferUsage.WriteOnly. Calling GetData on a resource that was created with BufferUsage.WriteOnly is not supported.

Requirements

Namespace: Microsoft.Xna.Framework.Graphics

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

See Also

Reference

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

Platforms

Windows Phone