Microsoft DirectX 8.1 (Visual Basic) |
Locks a vertex buffer and obtains access to the vertex buffer memory.
object.LockVertexBuffer( _ Flags As Long) As Long
Returns a Long value providing access to the locked vertex data.
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.
This method applies to the following classes, which implement methods from D3DXBaseMesh.
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.