Just something that was confusing me for a while the last hour (or maybe I'm still confused and everything is fine?) ...
setRenderTarget says that setRenderTarget (0) restores the previous rendertarget - also the variables used in the D3D drivers are called PrevRenderTarget. But I think that's not what is actually done (and probably also wouldn't make sense to do). As far as I can see it does not restore the previous RT but the original default RT (aka - the screen). So only the previous if you just use a single rendertarget, but not if you work with more than one. Or said different - it doesn't update the PrevRenderTarget when it already has one.
So I suppose the code is correct (except variable-names), but the documentation probably not.
setRenderTarget documentation
setRenderTarget documentation
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: setRenderTarget documentation
Yeah, wording seems to come from the time when only one RTT was available. The 0 restores the initial framebuffer as target.