IndexBuffer.GetData Generic Method (T , Int32, Int32)
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,
int startIndex,
int elementCount
) where T : ValueType
Type Parameters
- T
The type of elements in the array.
Parameters
- data
The array to receive index buffer data. - startIndex
The index of the element in the array at which to start copying. - elementCount
The number of elements to copy.
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