   one object displays over other object even when world rotated
  Hi,I''m a beginner to DirectX so please bare with me. I created an app with two cubes and the one is always drawn over the other one.  I know that the order in which the objects are drawn plays a part in this but I have set ZBufferEnable to true, as i thought depth testing would have solved the problem.  Does anyone have any idea what I''m doing wrong.  Would appreciate your help.Thanks.Cheers cheers.Craig 
  Check to make sure you haven''t swapped your near and far when you set up your perspective.  A guy I know set his far closer than his near and everything was rendering back to front all wacky-like.   -Joe Bob Jr ;  Hi,Thanks for the reply, I appreciate it.  Here are my world, view and projection matrices.  I tried also setting the far to -500f. and it did the same thing.d3dDevice.Transform.World = Matrix.Identity;d3dDevice.Transform.View = Matrix.LookAtLH(new Vector3(0f, 0f, 200f), new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f));d3dDevice.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4f, aspect, 0f, 500.0f);Anyway other ideas?Thanks again.Regards,Craig;  you must have the cubes in the same matrix post your rendering code ;  Even if you set the ZBufferEnable to true, make sure that you actually create the z-buffer.  The easiest way to do this is to make sure that you fill out the D3DPRESENT_PARAMETERS properly when you create your D3D device.Specifically, make sure that the EnableAutoDepthStencil member is set to TRUE, and that the AutoDepthStencilFormat member is set to something valid for your card.  A safe choice would be D3DFMT_D16.neneboricua ;  Found the prob...it was my projection matrix.I replaced the 0.0f with 1.0f for the near and it works fine now.thanks for your help, I appreciate it Cheers 