VertexBuffer.SetData(Object,Int32,LockFlags) Method (Microsoft.DirectX.Direct3D)

Locks, sets, and unlocks a range of vertex data.


Visual Basic Public Sub SetData( _
    ByVal data As Object, _
    ByVal lockAtOffset As Integer, _
    ByVal flags As LockFlags _
C# public void SetData(
    object data,
    int lockAtOffset,
    LockFlags flags
C++ public:
void SetData(
    ObjectLeave Sitedata,
    int lockAtOffset,
    LockFlags flags
JScript public function SetData(
    data : ObjectLeave Site,
    lockAtOffset : int,
    flags : LockFlags


data System.Object
An ObjectLeave Site that contains the data to copy into the vertex buffer. This can be any value type or any type that contains only value types.
lockAtOffset System.Int32
Offset in the vertex buffer to set. To set the entire buffer, set this parameter to 0.
flags Microsoft.DirectX.Direct3D.LockFlags
Zero or more LockFlags locking flags that describe the type of lock to perform when setting the buffer. For this method, the valid flags are Discard, NoDirtyUpdate, NoSystemLock, ReadOnly, and NoOverWrite. For a description of the flags, see LockFlags.


The Lock.Discard and NoOverWrite flags are valid only on buffers created with Dynamic.



The method call is invalid. For example, a method's parameter might contain an invalid value.