If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?


1 Answer 1


You do not, calling ID3D11DeviceContext::OMSetRenderTargets with the DepthStencilView parameter being a null pointer is perfectly valid, and you can still draw fine:

No Z-Buffer used http://dl.dropbox.com/u/21007284/tris.png

Obviously though, whatever you drew last will be drawn on top of everything else, regardless of its actual Z position - the colorful triangle in the image is behind the white one, but was drawn last.

  • \$\begingroup\$ great, I use the painters algorithm, so this is no problem. thanks! \$\endgroup\$ Jan 25, 2013 at 23:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .