DXLOCKSURF Enumeration

Determines how a surface should be locked by the IDXSurface::LockSurface method.

Syntax

typedef enum DXLOCKSURF
{
    DXLOCKF_READ        =       0,
    DXLOCKF_READWRITE   =       (1 << 0),
    DXLOCKF_EXISTINGINFOONLY =  (1 << 1),
    DXLOCKF_WANTRUNINFO =       (1 << 2),
    DXLOCKF_NONPREMULT  =   (1 << 16), 
    DXLOCKF_VALIDFLAGS  =   (DXLOCKF_READWRITE
							|DXLOCKF_EXISTINGINFOONLY
							| DXLOCKF_WANTRUNINFO
							| DXLOCKF_NONPREMULT)
} DXLOCKSURF;

Elements

DXLOCKF_READ
Surface to be locked is read-only.
DXLOCKF_READWRITE
Surface to be locked is read/write.
DXLOCKF_EXISTINGINFOONLY
Lock should use existing sample runmap information.
DXLOCKF_WANTRUNINFO
Lock should produce a sample runmap, if one does not exist.
DXLOCKF_NONPREMULT
Surface to be locked uses a sample format that is not alpha premultiplied.
DXLOCKF_VALIDFLAGS
Bitwise OR of all flags that is used to test for invalid input.

Remarks

A call to IDXSurface::LockSurface typically uses either DXLOCKF_READ or DXLOCKF_READWRITE. DXLOCKF_EXISTINGINFOONLY, if used in conjunction with DXLOCKF_WANTRUNINFO, prevents creation of a pixel runmap, if one does not exist.

The flags in the high word should be specific to the type of pointer that is requested. These flags define ARGB flags; they are optional for ARGB locks.

For DXLOCKF_NONPREMULT, the caller will request data that is not premultiplied.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.