Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX9 Depth Buffer Querying...

Started by bcome Nov 19, 2003 at 6:44 PM 0 replies 450+ views
Original Post
bcome
bcome
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:
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
<!-- ................................ -->u r what u bcomeMy (XHTML

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.