createRenderTargetTexture - how to change texture 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
asphodeli
Posts: 36
Joined: Thu Jul 24, 2008 12:46 am
Location: Singapore

createRenderTargetTexture - how to change texture background

Post by asphodeli »

Hi guys,

createRenderTargetTexture is working fine and all, but I need to change the default blue background to black, is there any way I can do that?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, the color used when setting the RenderTarget should clear the backbuffer to that value.
asphodeli
Posts: 36
Joined: Thu Jul 24, 2008 12:46 am
Location: Singapore

Post by asphodeli »

hybrid wrote:Yes, the color used when setting the RenderTarget should clear the backbuffer to that value.
Argh! Okay. Its hidden somewhere in the docs and I couldn't find it. :?
asphodeli
Posts: 36
Joined: Thu Jul 24, 2008 12:46 am
Location: Singapore

Post by asphodeli »

just to check, does RTT render IGUIEnvironment as well, or do I have to set the GUI widgets to invisible?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

That all depends on your code...

With RTT you set the render target then call smgr->drawAll() to get the scene rendered into the texture. If you then want the GUI as well then you call gui->drawAll(), if you don't call that then it won't get rendered.
Image Image Image
Post Reply