Original Post
I query to see if there exists a D3DFMT_D16 and both tests result in a yes (I am using the DX documentation). But when it comes to creating the device, I get this reported to me in the debug window:
u r what u bcome
Direct3D9: (ERROR) :Failed to create driver surface Direct3D9: (ERROR) :Error during initialization of surface. CreateRenderTarget/CreateDepthStencil failed Direct3D9: (ERROR) :Failure trying to create automatic zstencil surface. CreateDevice Failed. Direct3D9: (ERROR) :Failed to initialize Framework Device. CreateDevice Failed.This is the code that I am using to check to see if there is support:
D3DDISPLAYMODE d3ddm;
g_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm);
//...
if (FAILED(g_pD3D->CheckDepthStencilMatch(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, d3ddm.Format,
d3ddm.Format, D3DFMT_D16)))
{
OutputDebugString("Simple Z-Buffer support not found.\n");
return E_FAIL;
}
if (FAILED(g_pD3D->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
d3ddm.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D16)))
{
OutputDebugString("Simple Z-Buffer support not found.\n");
return E_FAIL;
}
u r what u bcome