8.12.2010

DirectDraw Capability in CE 6.0

要知道系統哪些 DirectDraw Function 是 hardware support,哪些是用 software emulate,
可以用 IDirectDraw::GetCaps 來取得 ddraw capability 列表:
HRESULT GetCaps(
LPDDCAPS lpDDDriverCaps,
LPDDCAPS lpDDEmulCaps
);

傳進去的兩個 argument 都是用來取出 capability 的 structure pointer,結構完全一樣,一個是 hardware support list,一個是 software emulation list
  • lpDDDriverCaps : hardware
  • lpDDEmulCaps : software
Support List structure 的definition 是 DDCAPS

typedef struct _DDCAPS {
DWORD dwSize;
DWORD dwCKeyCaps;
DWORD dwPalCaps;
DWORD dwBltCaps;
DWORD dwAlphaCaps;
DWORD dwOverlayCaps;
DWORD dwVidMemTotal;
DWORD dwVidMemFree;
DWORD dwVidMemStride;
DWORD dwMaxVisibleOverlays;
DWORD dwCurrVisibleOverlays;
DWORD dwNumFourCCCodes;
DWORD dwAlignBoundarySrc;
DWORD dwAlignSizeSrc;
DWORD dwAlignBoundaryDest;
DWORD dwAlignSizeDest;
DWORD dwRops[DD_ROP_SPACE];
DWORD dwMinOverlayStretch;
DWORD dwMaxOverlayStretch;
DWORD dwMiscCaps;
} DDCAPS,FAR *LPDDCAPS;

每個 DWORD的每個 bit 都代表一個 function,宣告在 ddraw.h (C:\WINCE600\PUBLIC\COMMON\SDK\INC\ddraw.h)

platform builder public folder 附有一個 DDCAPS 的 sample program,可以列出 platform ddraw hardware/software support .
很悲慘的是,ddcaps structure 在 CE 6.0 大幅修改,所以DDCAPS sample code 在 6.0 不能 build 了!!
看這一篇: DirectDraw Migration.




我做了修改: Modify DDCAPS for CE 6.0

沒有留言: