Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualThe King2

Posted 28 February 2013 - 11:36 AM

Yes, the hud render target gets cleared in the 'normal' way, i.e. clear
colour, clear z, with a colour of 0,0,0,0. Not sure what you mean by 'or
is the backbuffer?'

 

If you call Device->clear(X,...); the currently set rendertarget gets cleared, where the first parameter ist the stage you bound it to using SetRenderTarget(X, surface). So if you just call "clear" at the end of the render loop after you set the rendertarget back to backbuffer (SetRenderTarget(0,NULL)) only the backbuffer will get cleared. You need to call Clear expicitely when the texture is bound as a rendertarget. You need to clear the backbuffer like you probably do know in addition to that.

 

Plus, no need to "Clear z" for a backbuffer-sized rendertarget.


#1The King2

Posted 28 February 2013 - 11:35 AM

Yes, the hud render target gets cleared in the 'normal' way, i.e. clear
colour, clear z, with a colour of 0,0,0,0. Not sure what you mean by 'or
is the backbuffer?'

 

If you call Device->clear(X,...); the currently set rendertarget gets cleared, where the first parameter ist the stage you bound it to using SetRenderTarget(X). So if you just call "clear" at the end of the render loop after you set the rendertarget back to backbuffer (SetRenderTarget(0,NULL)) only the backbuffer will get cleared. You need to call Clear expicitely when the texture is bound as a rendertarget. You need to clear the backbuffer like you probably do know in addition to that.

 

Plus, no need to "Clear z" for a backbuffer-sized rendertarget.


PARTNERS