Page 1 of 1
Rendering problem
Posted: Thu Jan 07, 2010 14:08
by Hideo
I tried to use CEGUI::Direct3D9Renderer in my rendering loop. The problem is I want to render console on top of GUI. Currently when I include CEGUI::System::getSingleton().renderGUI() call backgraound turns red. It should be black. Console doesn't render. Isn't render GUI encapsulated in the call? I want all my render states back!
Re: Rendering problem
Posted: Thu Jan 07, 2010 18:49
by Hideo
Is there any way to control renderer? There is NO reason for background to turn red.
Re: Rendering problem
Posted: Thu Jan 07, 2010 23:27
by Hideo
I'm pretty annoyed. I can't get the most basic functionality to work. Help anybody?
Re: Rendering problem
Posted: Fri Jan 08, 2010 09:58
by CrazyEddie
This has been covered may times on the forum. The D3D renderer modules do not automatically save and restore states - you need to do this yourself if it's important for your app.
CE.
Re: Rendering problem
Posted: Fri Jan 08, 2010 17:48
by Hideo
Put it in the documentation then.
Re: Rendering problem
Posted: Fri Jan 08, 2010 20:08
by Hideo
BTW, i have a question. Why aren't render states saved and restored automatically?
Re: Rendering problem
Posted: Sat Jan 09, 2010 19:02
by CrazyEddie
I've added a ticket to remind us to add a note in the docs as to the situation with saving / restoring of states.
The states are not saved for a couple of reasons. With the exception of the OpenGL renderer, none of the renderer modules have ever saved render state information - so it's not like D3D is the exception, which leads to the second reason, which is that not everybody would want or need this behaviour - so it's better that those who want it can add it easily to their code rather than forcing the overhead on everyone (at least this was the original reason I did not add it back in 2004). I've mentioned before the possibility of making this a runtime option, perhaps I should look into this again sometime.
You should also be aware that we're not setting all possible states in the renderer either (since it has potential to be prohibitively expensive), so depending on what states the host app is setting, it may be required to reset certain states back to their defaults prior to calling the CEGUI rendering function.
CE.