[solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

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

Dugi
Just popping in
Just popping in
Posts: 14
Joined: Fri Apr 17, 2015 20:41

Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

Postby Dugi » Sat Jul 16, 2016 15:09

Can u plz b more specific about function names?
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.

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

Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

Postby YaronCT » Sat Jul 16, 2016 18:54

@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".

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.

Dugi
Just popping in
Just popping in
Posts: 14
Joined: Fri Apr 17, 2015 20:41

Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

Postby Dugi » Sat Jul 16, 2016 20:17

Thank you for the explanation.

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

Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

Postby YaronCT » Tue Jul 19, 2016 17:03

@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.

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

Re: [solved] How do I set up CEGUI on Ogre 2.1? Default GUI context isn't a rendering window?

Postby YaronCT » Thu Jul 21, 2016 12:44

@Dugi: 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 15 guests