Original Post
Hi, I've got a z-buffer issue happening that I can't seem to get fixed. I feel sure it's simply a setup issue, so I'll try and layout the scenario. First, I am placing two quads in world space at 0,0,0 and 0.5,0.5,0.5. The second quad is being draw last (on purpose), but it should be occluded by the first quad. This is not happening! Quad two displays on top of quad one. If I rotate quad one, it will jump in front of or behind quad two. The important code snips are as follows: d3dpp.EnableAutoDepthStencil = true; d3dpp.AutoDepthStencilFormat = D3DFMT_D24S8; SetRenderState( D3DRS_ZENABLE, D3DZB_TRUE ); D3DXMatrixPerspectiveFovLH(..., 1.57f, 1.33f, 0.0f, 1.0f); Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, m_rgbaClear, 1.0f, 0); Thanks, marlboro