[Solved] OGRE writeContentsToFile() excludes CEGUI interface
Moderators: CEGUI MVP, CEGUI Team
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
And I mean b4 you've added another call to "renderAllGUIContexts" just b4 "writeContentsToFile", of course.
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
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
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
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
@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.
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
I'd already removed them all.
Thanks very much for your assistance.
Andrew
Thanks very much for your assistance.
Andrew
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
@andrewc:
NP. Does now everything work properly?
NP. Does now everything work properly?
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
@YaronCT: All working fine, thanks.
Andrew
Andrew
Re: [Solved] OGRE writeContentsToFile() excludes CEGUI interface
![Very Happy :D](./images/smilies/icon_biggrin.gif)
If you're interested, feel free to share with us about the project u work on (in the dedicated forum).
Who is online
Users browsing this forum: No registered users and 14 guests