|
|
请问 在DX9中如何lock到z-buffer,我是:
LPDIRECT3DSURFACE9 g_pSDepth = NULL;
g_pd3dDevice->CreateDepthStencilSurface( 800, 600, D3DFMT_D16, D3DMULTISAMPLE_NONE,
0, TRUE, & g_pSDepth, NULL);
g_pd3dDevice->SetDepthStencilSurface( g_pSDepth);
渲染一次场景后
D3DLOCKED_RECT LockedRect;
g_pSDepth-> LockRect(&LockedRect, NULL,0);
但是调试发现g_pSDepth-> LockRect(&LockedRect, NULL,0);一直失败,LockedRect一直为空。不只是为什么,是什么参数还要设吗?
请大侠们帮忙看一下。oTZ [em4] [em4] [em4] |
|