VertexBuffer.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 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
)
public void SetData (
Object data,
int lockAtOffset,
LockFlags flags
)
public function SetData (
data : Object,
lockAtOffset : int,
flags : LockFlags
)
Parameters
- data
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
Offset in the vertex buffer to set. To set the entire buffer, set this parameter to 0.
- flags
One or more LockFlags values that describe the type of lock to perform. The valid flags for this method are NoDirtyUpdate, NoOverwrite, and ReadOnly.
Exceptions
Exception type | Condition |
---|---|
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .
Platforms
Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
VertexBuffer Class
VertexBuffer Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace