LockFlags Enumeration (Microsoft.DirectX.Direct3D)
Defines the type of lock to perform.
Definition
Visual Basic Public Enum LockFlags C# public enum LockFlags C++ public enum class LockFlags JScript public enum LockFlags
Members
Member Value Description Discard 8192 The application overwrites every location within the region being locked, using a write-only operation. This is a valid option when using dynamic textures, dynamic vertex buffers, and dynamic index buffers. For vertex and index buffers, the application discards the entire buffer. A pointer to a new memory area is returned so that the direct memory access (DMA) and rendering from the previous area do not stall. For textures, the application overwrites every location within the region being locked, using a write-only operation. DoNotWait 16384 The application is allowed to gain back CPU cycles if the driver cannot lock the surface immediately. When this is the case, the lock call throws WasStillDrawingException. This flag can be used only when calling Surface.LockRectangle on surfaces created using Device.CreateOffscreenPlainSurface, Device.CreateRenderTarget, or Device.CreateDepthStencilSurface. It also can be used with a back buffer. NoDirtyUpdate 32768 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 set of regions changed during the lock operation. NoSystemLock 2048 By default, a video memory lock reserves a system-wide critical section, guaranteeing that no display mode changes will occur for the duration of the lock. This flag prevents the system-wide critical section from being held while the lock is on. While the lock operation is time-consuming, it enables the system to perform other duties, such as moving the mouse cursor. This flag is useful for locks of long duration; for example, locking the back buffer for software rendering that otherwise would slow the system. NoOverwrite 4096 The application is guaranteed not to overwrite any data in the vertex and index buffers. This flag allows the driver to return immediately and continue rendering, using this vertex buffer. If the flag is not used, the driver must finish rendering before returning from locking. ReadOnly 16 The application does not write to the buffer. This flag enables resources stored in non-native formats to save the recompression step when unlocking. None 0 Use no locks.
Enumeration Information
Namespace Microsoft.DirectX.Direct3D Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll) Strong Name Microsoft.DirectX.Direct3D, Version=1.0.900.0, Culture=neutral, PublicKeyToken=d3231b57b74a1492
See Also