|
|

楼主 |
发表于 2006-11-21 16:47:00
|
显示全部楼层
Re:请教关于depth buffer的使用问题
ls上可以说详细一点吗?这个方法我已经试过了,但是没有达到预期效果
代码如下:
g_pd3dDevice->CreateTexture( 16, 16, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &pDepthTexture, NULL );
pDepthTexture->GetSurfaceLevel(0, &pDestSurface );
g_pd3dDevice->GetDepthStencilSurface( &pDepthSurface );
g_pd3dDevice->GetRenderTargetData(pDepthSurface, pDestSurface);
我觉得这里应该用GetRenderTarget,因为文档里面说了depthstencil surface只能是 pool_default,所以从default 到systemmem只能用getRednderTarget了
很着急,能不能帮帮我~~ |
|