Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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> (
int offsetInBytes,
T[] data,
int startIndex,
int elementCount
) where T : ValueType
Type Parameters
- T
The type of elements in the array.
Parameters
- offsetInBytes
The number of bytes into the index buffer where copying will start. - 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