I wasn't describing a specific problem. Just that my code calls Ogre::Root::renderOneFrame(), then Ogre calls my code in Ogre::FrameListener::frameRenderingQueued(evt) in which I call some Ogre functions. This isn't exactly the most comprehensible construction, so I preferred to avoid it and the result was that CEGUI wasn't working. Just that it's not very intuitive, nothing serious.Can u plz b more specific about function names?
[solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
Moderators: CEGUI MVP, CEGUI Team
Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
@Dugi: I think that's a design decision made by Ogre, and a necessary one. Think about it - Ogre takes care of the rendering. It can't let any1 who wants to render do it whenever he wants. There has to b order. So it all has to b done in a dedicated place, "Ogre::FrameListener::frameRenderingQueued".
Now that I think of it, u don't need to "do" any rendering of the scene in Ogre - it's done for u automatically when u call "Ogre::Root::renderOneFrame". Making changes to the Ogre stuff like the scene or the cameras is something u don't have to do specifically inside "Ogre::FrameListener::frameRenderingQueued", so I'm sorry if I confused u here. I don't think there should b any harm if do it though. I don't know what's the recommendation here or if it matters at all - I'm not familiar enough with Ogre. The cegui rendering is a different matter - cegui does its own rendering, with its own custom shaders, independent of the Ogre scene concept. Therefore it must be done inside "Ogre::FrameListener::frameRenderingQueued".
I've also noticed that in Ogre 2 u can use "Ogre::RenderQueueListener" instead of "Ogre::FrameListener", which seems to b the preferred way now.
YaronCT wrote:Try to do all rendering (including cegui) from inside "frameRenderingQueued".
Now that I think of it, u don't need to "do" any rendering of the scene in Ogre - it's done for u automatically when u call "Ogre::Root::renderOneFrame". Making changes to the Ogre stuff like the scene or the cameras is something u don't have to do specifically inside "Ogre::FrameListener::frameRenderingQueued", so I'm sorry if I confused u here. I don't think there should b any harm if do it though. I don't know what's the recommendation here or if it matters at all - I'm not familiar enough with Ogre. The cegui rendering is a different matter - cegui does its own rendering, with its own custom shaders, independent of the Ogre scene concept. Therefore it must be done inside "Ogre::FrameListener::frameRenderingQueued".
I've also noticed that in Ogre 2 u can use "Ogre::RenderQueueListener" instead of "Ogre::FrameListener", which seems to b the preferred way now.
Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
Thank you for the explanation.
Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
@Dugi: As for "OgreRenderer::isRenderingEnabled" - I looked again at it's indeed on by default - sorry, again my mistake. However, with Ogre 2 auto-rendering in the cegui Ogre renderer isn't implemented yet, therefore it has no effect, and u have to do the rendering yourself anyway.. I now work to fix all issues in the cegui Ogre 2.0/2.1 renderer and in the sample framework using it. I'll let u know when it's done.
Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?
@Dugi: 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 21 guests