This topic has not yet been rated - Rate this topic

DynamicVertexBuffer.SetData Generic Method (T[], Int32, Int32, SetDataOptions)

Sets dynamic vertex buffer data, specifying the start index, number of elements and options.

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

public void SetData<T> (
         T[] data,
         int startIndex,
         int elementCount,
         SetDataOptions options
) where T : ValueType

Type Parameters

T
The type of the elements in the array.

Parameters

data
Array of data.
startIndex
The first element to use.
elementCount
The number of elements to use.
options
Specifies whether existing data in the buffer will be kept after this operation. Dynamic geometry may be rendered on the Xbox 360 by using DrawUserIndexedPrimitives instead of setting the data for the vertex buffer.
An InvalidOperationException is thrown if an attempt is made to modify (for example, calls to the SetData method) a resource that is currently set on a graphics device.
Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.