Rendering problem
Moderators: CEGUI MVP, CEGUI Team
Rendering problem
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
Is there any way to control renderer? There is NO reason for background to turn red.
Re: Rendering problem
I'm pretty annoyed. I can't get the most basic functionality to work. Help anybody?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Rendering problem
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.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Rendering problem
Put it in the documentation then.
Re: Rendering problem
BTW, i have a question. Why aren't render states saved and restored automatically?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Rendering problem
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.
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.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 10 guests