共用方式為


VertexBuffer.SetData Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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 VertexBuffer
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
)
member SetData : 
        data:Object * 
        lockAtOffset:int * 
        flags:LockFlags -> unit 

Parameters

  • data
    Type: System.Object
    An object 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
    Type: System.Int32
    Offset in the vertex buffer to set. To set the entire buffer, set this parameter to 0.

Exceptions

Exception Condition
InvalidCallException

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

Remarks

The Discard and NoOverwrite values for LockFlags are valid only on buffers created with Dynamic specified for Usage.

.NET Framework Security

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

See Also

Reference

VertexBuffer Class

VertexBuffer Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace