Rendering objects to the background

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
roelor
Posts: 240
Joined: Wed Aug 13, 2008 8:06 am

Rendering objects to the background

Post by roelor »

What would be the most easy way to do it, the only way I know of is:
Loop through all nodes
  • make a list of which are visible
  • make them invisible
  • make the background objects visible
  • and use a render target
  • then reset everything back to normal
Last edited by roelor on Wed Nov 09, 2011 6:49 am, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rendering objects to the background

Post by CuteAlien »

You can also put them in an own SceneManager. Using 2 parent-nodes (one for foreground ond for background) and flipping between those would probably also work. Then render first the background scene, reset the z-buffer and then render the foreground scene.
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
Post Reply