Jump to content
  • Advertisement
Sign in to follow this  

[D3D9] Automatic v.s. manual depth buffer creation

This topic is 4219 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Currently I creating window output interface to my engine. Now I'm using automatic depth buffer creation.
  D3DPRESENT_PARAMETERS l_present_parameters;
  l_present_parameters.EnableAutoDepthStencil = TRUE;
  l_present_parameters.Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL;
Now D3D discards my depth buffer immediately after call to Present() or SetDepthStencilBuffer(). This option it will be faster than manualy managing? It mean: I creating my depth buffer once and I'm using it simultaneously with render target. I'm setting it via SetRenderTarget() and SetDepthStencilBuffer() before rendering scene. Which option is faster? There is big difference when I have a few output windows? Second question. If I want do disable depth buffer when I'm using automatic buffer managment should I call SetDepthStencilBuffer() with NULL or just forgot about it and ignore all depth releated flags?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!