Microsoft DirectX 8.1 (Visual Basic)

CONST_D3DLOCKFLAGS

Defines locking flags.

Enum CONST_D3DLOCKFLAGS
    D3DLOCK_READONLY        =    16 (&H10)
    D3DLOCK_NOSYSLOCK       =  2048 (&H800)
    D3DLOCK_NOOVERWRITE     =  4096 (&H1000)
    D3DLOCK_DISCARD         =  8192 (&H2000)
    D3DLOCK_NO_DIRTY_UPDATE = 32768 (&H8000)
End Enum

Constants

D3DLOCK_READONLY
The application will not write to the buffer. This enables some optimizations. D3DLOCK_READONLY cannot be specified with D3DLOCK_DISCARD; nor can it be specified on an index or vertex buffer created with D3DUSAGE_WRITEONLY.
D3DLOCK_NOSYSLOCK
The default behavior of a video memory lock is to reserve a system-wide critical section, guaranteeing that no display mode changes will occur for the duration of the lock. This flag causes the system-wide critical section not to be held for the duration of the lock.

The lock operation is slightly more expensive, but can enable the system to perform other duties, such as moving the mouse cursor. This flag is useful for long duration locks, such as the lock of the back buffer for software rendering that would otherwise adversely affect system

D3DLOCK_NOOVERWRITE
Indicates that no indices or vertices that were referred to in drawing calls since the start of the frame or the last lock without this flag will be modified during the lock. This can enable optimizations only when the application is appending data to the index or vertex buffer. This flag is valid only on buffers created with D3DUSAGE_DYNAMIC.
D3DLOCK_DISCARD
The application overwrites, with a write-only operation, the entire buffer. This enables Direct3D to return a pointer to a new memory area so that dynamic memory access (DMA) and rendering from the old area do not stall. This flag is valid only for index and vertex buffers. This flag is valid only on buffers created with D3DUSAGE_DYNAMIC.
D3DLOCK_NO_DIRTY_UPDATE
By default, a lock on a resource adds a dirty region to that resource. This flag prevents any changes to the dirty state of the resource. Applications should use this flag when they have additional information about the actual set of regions changed during the lock operation. Note that this flag is not valid for vertex and index buffers.