|
创建设备方式如下:
m_pIDirect3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hWnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dPresent_Param,
&m_pIDirect3DDevice)
然后创建深度贴图:
GetDirect3DDevice()->CreateTexture(TargetWidth , TargetLength , 1 ,
D3DUSAGE_DEPTHSTENCIL , TargetDepthformat ,
D3DPOOL_DEFAULT , &pRenderDepthTexture , 0)
最后返回为失败。
但是使用D3DDEVTYPE_HAL方式创建设备,深度贴图就能被成功创建。
不知道出了什么问题。
|
|