Microsoft DirectX 9.0 SDK Update (October 2004)

IndexBuffer.SetData Method

Language:

Note: This documentation is preliminary and is subject to change.

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

Definition

Visual Basic .NET 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
);
Managed C++ public: void SetData(
    Object *data,
    int lockAtOffset,
    LockFlags flags
);
JScript .NET public function SetData(
    data : Object,
    lockAtOffset : int,
    flags : LockFlags
);

Parameters

data System.Object. An Object Leave Site that contains the data to copy into the index buffer.
lockAtOffset System.Int32. Offset to set in the index buffer. 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.

Remarks

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

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


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center