Original Post
I always thought the Z-buffer was what ensured that triangles are drawn from back to front. Graham was telling me that the DX SDK says that the depth stencil is responsible for this.
I started experimenting with a program. If I commented out the Auto Depth Stencil settings in the Init, things would be drawn incorrectly, and there were wierd colors and stuff in the background. Then, I took out the flag D3DCLEAR_ZBUFFER from the Clear() function. Now it renders triangles in incorrect order, and there are no funky colors in the background.
What are the depth stencil and z-buffer responsible for? Are they the same thing?
Proceeding on a brutal rampage is the obvious choice.