📄 ddraw.h
字号:
typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3;
/*
* This structure is the DDCAPS structure as it was in version 5 of Direct X.
* It is present for back compatability.
*/
typedef struct _DDCAPS_DX5
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DWORD dwCaps; // driver specific capabilities
/* 8*/ DWORD dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
// Members added for DX5:
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
} DDCAPS_DX5;
typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5;
typedef struct _DDCAPS_DX6
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DWORD dwCaps; // driver specific capabilities
/* 8*/ DWORD dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha caps
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
// Members added for DX6 release
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
} DDCAPS_DX6;
typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6;
typedef struct _DDCAPS_DX7
{
/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure
/* 4*/ DWORD dwCaps; // driver specific capabilities
/* 8*/ DWORD dwCaps2; // more driver specific capabilites
/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface
/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites
/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities
/* 18*/ DWORD dwPalCaps; // palette capabilities
/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities
/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8
/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8
/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8
/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8
/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8
/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8
/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32
/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory
/* 40*/ DWORD dwVidMemFree; // amount of free video memory
/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays
/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays
/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes
/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment
/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size
/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment
/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size
/* 60*/ DWORD dwAlignStrideAlign; // stride alignment
/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported
/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
/* a0*/ DWORD dwReserved1; // reserved
/* a4*/ DWORD dwReserved2; // reserved
/* a8*/ DWORD dwReserved3; // reserved
/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts
/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts
/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts
/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts
/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts
/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts
/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts
/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts
/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts
/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts
/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts
/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts
/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports
/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used
/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts
/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts
/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts
/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts
/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts
/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts
// Members added for DX6 release
/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps
} DDCAPS_DX7;
typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7;
#if DIRECTDRAW_VERSION <= 0x300
typedef DDCAPS_DX3 DDCAPS;
#elif DIRECTDRAW_VERSION <= 0x500
typedef DDCAPS_DX5 DDCAPS;
#elif DIRECTDRAW_VERSION <= 0x600
typedef DDCAPS_DX6 DDCAPS;
#else
typedef DDCAPS_DX7 DDCAPS;
#endif
typedef DDCAPS FAR* LPDDCAPS;
/*
* DDPIXELFORMAT
*/
typedef struct _DDPIXELFORMAT
{
DWORD dwSize; // size of structure
DWORD dwFlags; // pixel format flags
DWORD dwFourCC; // (FOURCC code)
union
{
DWORD dwRGBBitCount; // how many bits per pixel
DWORD dwYUVBitCount; // how many bits per pixel
DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits)
DWORD dwAlphaBitDepth; // how many bits for alpha channels
DWORD dwLuminanceBitCount; // how many bits per pixel
DWORD dwBumpBitCount; // how many bits per "buxel", total
DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture
// format list and if DDPF_D3DFORMAT is set
} DUMMYUNIONNAMEN(1);
union
{
DWORD dwRBitMask; // mask for red bit
DWORD dwYBitMask; // mask for Y bits
DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
DWORD dwLuminanceBitMask; // mask for luminance bits
DWORD dwBumpDuBitMask; // mask for bump map U delta bits
DWORD dwOperations; // DDPF_D3DFORMAT Operations
} DUMMYUNIONNAMEN(2);
union
{
DWORD dwGBitMask; // mask for green bits
DWORD dwUBitMask; // mask for U bits
DWORD dwZBitMask; // mask for Z bits
DWORD dwBumpDvBitMask; // mask for bump map V delta bits
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -