IndexBuffer.SetData Method
Locks, sets, and unlocks a range of vertex data.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Sub SetData ( _
data As Object, _
lockAtOffset As Integer, _
flags As LockFlags _
)
'Usage
Dim instance As IndexBuffer
Dim data As Object
Dim lockAtOffset As Integer
Dim flags As LockFlags
instance.SetData(data, lockAtOffset, flags)
public void SetData(
Object data,
int lockAtOffset,
LockFlags flags
)
public:
void SetData(
Object^ data,
int lockAtOffset,
LockFlags flags
)
public function SetData(
data : Object,
lockAtOffset : int,
flags : LockFlags
)
Parameters
data
Type: System.ObjectAn object containing the data copy into the index buffer. This is typically an array of Int32 or Int16.
lockAtOffset
Type: System.Int32Offset to set in the index buffer. To set the entire buffer, set this parameter to 0.
flags
Type: Microsoft.WindowsMobile.DirectX.Direct3D.LockFlagsZero or more LockFlags locking flags that describe the type of lock method to perform while setting the buffer. For this method, the valid flags are:
Discard field
NoDirtyUpdate field
NoOverwrite field
ReadOnly field
Exceptions
Exception | Condition |
---|---|
InvalidCallException | The method call is invalid. For example, a method's parameter might contain an invalid value. |
Remarks
The Discard and NoOverwrite fields for a LockFlags are valid only with buffers created with the Dynamic member of the Usage enumeration.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0