Microsoft DirectX 8.1 (Visual Basic)

D3DXSkinMesh.LockVertexBuffer

Locks a vertex buffer.

object.LockVertexBuffer( _ 
    Flags As Long) As Long

Parts

object
Object expression that resolves to a D3DXSkinMesh object.
Flags
A combination of one or more locking flags, indicating how the vertex buffer memory should be locked. Possible values are defined by the CONST_D3DLOCKFLAGS enumeration.

Return Values

First element of an array of BYTE values, filled with the returned vertex data.

Error Codes

If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

When working with vertex buffers, you are allowed to make multiple lock calls. However, you must ensure that the number of lock calls match the number of unlock calls. DrawPrimitive calls do not succeed with any outstanding lock count on any currently set vertex buffer.

See Also

D3DXSkinMesh.UnlockVertexBuffer