[Solved] OGRE writeContentsToFile() excludes CEGUI interface

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

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby YaronCT » Wed Jul 27, 2016 15:27

And I mean b4 you've added another call to "renderAllGUIContexts" just b4 "writeContentsToFile", of course.

andrewc
Just popping in
Just popping in
Posts: 16
Joined: Thu Jul 14, 2016 11:56

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby andrewc » Thu Jul 28, 2016 08:15

CEGUI rendering was just being done automatically, as per the default. As I mentioned, it was because of that that I hadn't really thought too hard about the sequence of rendering events. I hadn't even got as far as realizing that I could turn off the automatic rendering and do it myself.

But anyway, I now have an idea of what the problem was: I had previously (before using CEGUI) been having some problems with the scene and SDK tray panels not being quite up-to-date when saving a screenshot, so I had put in calls to m_renderWindow->update() in a couple of places (i.e. Ogre::RenderTarget::update). It appears that this redraws the OGRE scene but not the CEGUI interface, and so if that is the last rendering-related call before writeContentsToFile() then it would make sense that the GUI wouldn't be present, right?

If that is indeed the explanation, then I suppose the question is whether calling m_renderWindow->update() should be expected to redraw the CEGUI windows too, or not.

Andrew

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby YaronCT » Thu Jul 28, 2016 09:43

@andrewc: That's indeed the problem. If u call "Ogre::Root::renderOneFrame" it automatically updates all render targets, so there's no reason for u to call "Ogre::RenderTarget::update" (which doesn't call frame event handlers, which draw cegui). Plz remove all calls to "Ogre::RenderTarget::update", and if u have any problems, we'll try to solve them.

andrewc
Just popping in
Just popping in
Posts: 16
Joined: Thu Jul 14, 2016 11:56

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby andrewc » Thu Jul 28, 2016 10:29

I'd already removed them all.

Thanks very much for your assistance.
Andrew

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby YaronCT » Thu Jul 28, 2016 10:33

@andrewc:

NP. Does now everything work properly?

andrewc
Just popping in
Just popping in
Posts: 16
Joined: Thu Jul 14, 2016 11:56

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby andrewc » Thu Jul 28, 2016 11:02

@YaronCT: All working fine, thanks.

Andrew

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface

Postby YaronCT » Thu Jul 28, 2016 14:27

:D

If you're interested, feel free to share with us about the project u work on (in the dedicated forum).


Return to “Help”

Who is online

Users browsing this forum: No registered users and 21 guests