- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all:
I'm developing a virtual graphics card driver under XDDM.
I have finished the DirectDraw part of the driver, and i can see the DirectDraw is enabled in dxdiag.
Now i'm developing the D3D part, but when i handle GUID_ZPixelFormats in DdGetDriverInfo, DirectDraw is disabled !
Does anyone know how to handle GUID_ZPixelFormats in DdGetDriverInfo ?
My code:
void DdInitZPixelFormats(PDD_GETDRIVERINFODATA lpGetDriverInfo)
{
static const DDPIXELFORMAT g_zfmts[] =
{
{
sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0,
{ 16 }, { 0 }, { 0x0000ffff }, { 0x00000000 }, { 0x00000000 }
},
{
sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0,
{ 32 }, { 0 }, { 0x00ffffff }, { 0x00000000 }, { 0x00000000 }
},
};
DWORD num = sizeof(g_zfmts) / sizeof(DDPIXELFORMAT);
DWORD size = sizeof(g_zfmts);
UINT8 *buf = (UINT8 *)lpGetDriverInfo->lpvData;
memcpy(buf, g_zfmts, min(lpGetDriverInfo->dwExpectedSize, sizeof(g_zfmts)));
lpGetDriverInfo->dwActualSize = size;
lpGetDriverInfo->ddRVal = DD_OK;
}
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page