📄 ddraw.h
字号:
struct
{
WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT
WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT
} MultiSampleCaps;
} DUMMYUNIONNAMEN(3);
union
{
DWORD dwBBitMask; // mask for blue bits
DWORD dwVBitMask; // mask for V bits
DWORD dwStencilBitMask; // mask for stencil bits
DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map
} DUMMYUNIONNAMEN(4);
union
{
DWORD dwRGBAlphaBitMask; // mask for alpha channel
DWORD dwYUVAlphaBitMask; // mask for alpha channel
DWORD dwLuminanceAlphaBitMask;// mask for alpha channel
DWORD dwRGBZBitMask; // mask for Z channel
DWORD dwYUVZBitMask; // mask for Z channel
} DUMMYUNIONNAMEN(5);
} DDPIXELFORMAT;
typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT;
/*
* DDOVERLAYFX
*/
typedef struct _DDOVERLAYFX
{
DWORD dwSize; // size of structure
DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend
DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend
DWORD dwReserved;
DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination
union
{
DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest
LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest
} DUMMYUNIONNAMEN(1);
DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source
union
{
DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src
LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src
} DUMMYUNIONNAMEN(2);
DDCOLORKEY dckDestColorkey; // DestColorkey override
DDCOLORKEY dckSrcColorkey; // DestColorkey override
DWORD dwDDFX; // Overlay FX
DWORD dwFlags; // flags
} DDOVERLAYFX;
typedef DDOVERLAYFX FAR *LPDDOVERLAYFX;
/*
* DDBLTBATCH: BltBatch entry structure
*/
typedef struct _DDBLTBATCH
{
LPRECT lprDest;
LPDIRECTDRAWSURFACE lpDDSSrc;
LPRECT lprSrc;
DWORD dwFlags;
LPDDBLTFX lpDDBltFx;
} DDBLTBATCH;
typedef DDBLTBATCH FAR * LPDDBLTBATCH;
/*
* DDGAMMARAMP
*/
typedef struct _DDGAMMARAMP
{
WORD red[256];
WORD green[256];
WORD blue[256];
} DDGAMMARAMP;
typedef DDGAMMARAMP FAR * LPDDGAMMARAMP;
/*
* This is the structure within which DirectDraw returns data about the current graphics driver and chipset
*/
#define MAX_DDDEVICEID_STRING 512
typedef struct tagDDDEVICEIDENTIFIER
{
/*
* These elements are for presentation to the user only. They should not be used to identify particular
* drivers, since this is unreliable and many different strings may be associated with the same
* device, and the same driver from different vendors.
*/
char szDriver[MAX_DDDEVICEID_STRING];
char szDescription[MAX_DDDEVICEID_STRING];
/*
* This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
* on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
* drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
*
* This version has the form:
* wProduct = HIWORD(liDriverVersion.HighPart)
* wVersion = LOWORD(liDriverVersion.HighPart)
* wSubVersion = HIWORD(liDriverVersion.LowPart)
* wBuild = LOWORD(liDriverVersion.LowPart)
*/
#ifdef _WIN32
LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
#else
DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
DWORD dwDriverVersionHighPart;
#endif
/*
* These elements can be used to identify particular chipsets. Use with extreme caution.
* dwVendorId Identifies the manufacturer. May be zero if unknown.
* dwDeviceId Identifies the type of chipset. May be zero if unknown.
* dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
* dwRevision Identifies the revision level of the chipset. May be zero if unknown.
*/
DWORD dwVendorId;
DWORD dwDeviceId;
DWORD dwSubSysId;
DWORD dwRevision;
/*
* This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
* driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
* reprofile the graphics subsystem.
* This element can also be used to identify particular problematic drivers.
*/
GUID guidDeviceIdentifier;
} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER;
typedef struct tagDDDEVICEIDENTIFIER2
{
/*
* These elements are for presentation to the user only. They should not be used to identify particular
* drivers, since this is unreliable and many different strings may be associated with the same
* device, and the same driver from different vendors.
*/
char szDriver[MAX_DDDEVICEID_STRING];
char szDescription[MAX_DDDEVICEID_STRING];
/*
* This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons
* on the whole 64 bits. Caution should be exercised if you use this element to identify problematic
* drivers. It is recommended that guidDeviceIdentifier is used for this purpose.
*
* This version has the form:
* wProduct = HIWORD(liDriverVersion.HighPart)
* wVersion = LOWORD(liDriverVersion.HighPart)
* wSubVersion = HIWORD(liDriverVersion.LowPart)
* wBuild = LOWORD(liDriverVersion.LowPart)
*/
#ifdef _WIN32
LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */
#else
DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */
DWORD dwDriverVersionHighPart;
#endif
/*
* These elements can be used to identify particular chipsets. Use with extreme caution.
* dwVendorId Identifies the manufacturer. May be zero if unknown.
* dwDeviceId Identifies the type of chipset. May be zero if unknown.
* dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown.
* dwRevision Identifies the revision level of the chipset. May be zero if unknown.
*/
DWORD dwVendorId;
DWORD dwDeviceId;
DWORD dwSubSysId;
DWORD dwRevision;
/*
* This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the
* driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to
* reprofile the graphics subsystem.
* This element can also be used to identify particular problematic drivers.
*/
GUID guidDeviceIdentifier;
/*
* This element is used to determine the Windows Hardware Quality Lab (WHQL)
* certification level for this driver/device pair.
*/
DWORD dwWHQLLevel;
} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2;
/*
* Flags for the IDirectDraw4::GetDeviceIdentifier method
*/
/*
* This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
* with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
* host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
* returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
* of the DirectDraw object involved.
*/
#define DDGDI_GETHOSTIDENTIFIER 0x00000001L
/*
* Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
*/
#define GET_WHQL_YEAR( dwWHQLLevel ) \
( (dwWHQLLevel) / 0x10000 )
#define GET_WHQL_MONTH( dwWHQLLevel ) \
( ( (dwWHQLLevel) / 0x100 ) & 0x00ff )
#define GET_WHQL_DAY( dwWHQLLevel ) \
( (dwWHQLLevel) & 0xff )
/*
* callbacks
*/
typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext );
#ifdef STREAMING
typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD);
#endif
/*
* INTERACES FOLLOW:
* IDirectDraw
* IDirectDrawClipper
* IDirectDrawPalette
* IDirectDrawSurface
*/
/*
* IDirectDraw
*/
#if defined( _WIN32 ) && !defined( _NO_COM )
#undef INTERFACE
#define INTERFACE IDirectDraw
DECLARE_INTERFACE_( IDirectDraw, IUnknown )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -