Rendering problem

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Hideo
Just popping in
Just popping in
Posts: 10
Joined: Thu Jan 07, 2010 02:48

Rendering problem

Postby Hideo » Thu Jan 07, 2010 14:08

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!

Hideo
Just popping in
Just popping in
Posts: 10
Joined: Thu Jan 07, 2010 02:48

Re: Rendering problem

Postby Hideo » Thu Jan 07, 2010 18:49

Is there any way to control renderer? There is NO reason for background to turn red.

Hideo
Just popping in
Just popping in
Posts: 10
Joined: Thu Jan 07, 2010 02:48

Re: Rendering problem

Postby Hideo » Thu Jan 07, 2010 23:27

I'm pretty annoyed. I can't get the most basic functionality to work. Help anybody?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Rendering problem

Postby CrazyEddie » Fri Jan 08, 2010 09:58

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.

Hideo
Just popping in
Just popping in
Posts: 10
Joined: Thu Jan 07, 2010 02:48

Re: Rendering problem

Postby Hideo » Fri Jan 08, 2010 17:48

Put it in the documentation then.

Hideo
Just popping in
Just popping in
Posts: 10
Joined: Thu Jan 07, 2010 02:48

Re: Rendering problem

Postby Hideo » Fri Jan 08, 2010 20:08

BTW, i have a question. Why aren't render states saved and restored automatically?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Rendering problem

Postby CrazyEddie » Sat Jan 09, 2010 19:02

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests