Jump to content
  • Advertisement
Sign in to follow this  
Tispe

The IDirect3DDevice9::Clear method

This topic is 2083 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

This might be a stupid question but does the Clear method only clear the current render targets?

 

The documentation says: "Clears one or more surfaces such as a render target, multiple render targets, a stencil buffer, and a depth buffer. [...] Use this method to clear a surface including: a render target, all render targets in an MRT, a stencil buffer, or a depth buffer. Flags determines how many surfaces are cleared. Use pRects to clear a subset of a surface defined by an array of rectangles."

 

If I set 4 render targets and call Clear(), will all these surfaces be cleared?

 

If I build a shadow map on a different render surface, then only if the pointer to the shadow map is taken off the MRT list it will not be cleared?

Share this post


Link to post
Share on other sites
Advertisement


If I set 4 render targets and call Clear(), will all these surfaces be cleared?


Yes..


If I build a shadow map on a different render surface, then only if the pointer to the shadow map is taken off the MRT list it will not be cleared?


Try not to thing of in terms of pointers to render target, think in terms of rendertarget bound to the device. For MRT, if the render target is not written to via a shader, its content will remain the same, unless in your case you call Clear.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!