Bagikan melalui


IndexBuffer.GetData Generic Method (T )

Copies the index buffer into an array.

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 elements in the array.

Parameters

  • data
    The array to receive index buffer data.

Exceptions

Exception type Condition
ArgumentNullException data is null.
InvalidOperationException The array specified in the data parameter is not the correct size for the amount of data requested.
NotSupportedException This IndexBuffer 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

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista