Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


The IDirect3DDevice9::Clear method


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Tispe   Members   -  Reputation: 1039

Like
0Likes
Like

Posted 06 February 2014 - 11:28 AM

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?



Sponsor:

#2 cgrant   Members   -  Reputation: 697

Like
1Likes
Like

Posted 06 February 2014 - 12:53 PM


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.

#3 cozzie   Members   -  Reputation: 1659

Like
1Likes
Like

Posted 07 February 2014 - 05:40 PM

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172514(v=vs.85).aspx

 

 

D3DCLEAR_TARGET Clear a render target, or all targets in a multiple render target. See Multiple Render Targets (Direct3D 9).

#4 mhagain   Crossbones+   -  Reputation: 8142

Like
0Likes
Like

Posted 08 February 2014 - 07:32 AM

 

http://msdn.microsoft.com/en-us/library/windows/desktop/bb172514(v=vs.85).aspx

 

 

D3DCLEAR_TARGET Clear a render target, or all targets in a multiple render target. See Multiple Render Targets (Direct3D 9).

 

 

When all else fails, read the documentation. :)


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS