VertexBuffer.GetData Generic Method (T , Int32, Int32)
Gets a copy of the vertex buffer data, specifying the start index and number of elements in the vertex buffer.
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 data in the vertex buffer.
Parameters
- data
The array into which to copy the vertex buffer data. - startIndex
Index of the element in the array at which to start copying. - elementCount
Number of elements in the array.
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