Compartir a través de


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 void SetData (
    Object data, 
    int lockAtOffset, 
    LockFlags flags
)
public function SetData (
    data : Object, 
    lockAtOffset : int, 
    flags : LockFlags
)
Not applicable.

Parameters

  • data
    An object containing the data copy into the index buffer. This is typically an array of Int32 or Int16.
  • lockAtOffset
    Offset to set in the index buffer. To set the entire buffer, set this parameter to 0.

Exceptions

Exception type 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.

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

IndexBuffer Class
IndexBuffer Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace