Rendering GUI in multiple viewports - OGRE

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

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Rendering GUI in multiple viewports - OGRE

Postby ianstangoe » Tue Nov 17, 2009 17:06

How do I setup the OgreRenderer to render gui elements onto multiple viewports of my choosing?

Thanks.
Last edited by ianstangoe on Wed Nov 18, 2009 14:30, edited 1 time in total.

User avatar
Jabberwocky
Quite a regular
Quite a regular
Posts: 86
Joined: Wed Oct 31, 2007 18:16
Location: Canada
Contact:

Re: Rendering in multiple viewports - OGRE

Postby Jabberwocky » Tue Nov 17, 2009 22:44

I'm pretty sure this isn't supported right now, either by CEGUI 0.6 or 0.7.

CrazyEddie talks a bit about a similar issue in this thread.

If you're a pretty solid Ogre coder, you may be able to write a new ogre-cegui renderer that supports this, but I don't think it would be trivial. I think it would require code both Ogre-side and CEGUI-side.
The Salvation Prophecy
Space Combat. Planet Exploration. Strategic Domination.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering in multiple viewports - OGRE

Postby ianstangoe » Tue Nov 17, 2009 22:52

Oh, thats a major step backwards for us then, it definitely did work in the 0.6.x series.

I've just spent a week getting 0.7.1 to work with our current applications but we need multiple viewport support as we work in stereo. Thats disappointing news. :(

Thanks for the info.

User avatar
Jabberwocky
Quite a regular
Quite a regular
Posts: 86
Joined: Wed Oct 31, 2007 18:16
Location: Canada
Contact:

Re: Rendering in multiple viewports - OGRE

Postby Jabberwocky » Wed Nov 18, 2009 03:41

Well, maybe I'm misunderstanding your problem then. How exactly did you get CEGUI 0.6.x to work on multiple viewports? I didn't think that was possible. Or did it just work automatically when you created multiple viewports within the same SceneManager?

The new CEGUIOgreRenderer seems to be completely different than the old OgreCEGUIRenderer. The new renderer seems to create it's own viewport to render on, rather than relying on a SceneManager* pointer. Actually, as much as I've been extremely happy with CEGUI 0.7.1, the new CEGUIOgreRenderer has given me a few problems too.

Maybe it would be possible to hack up a hybrid between the old renderer and the new renderer that would solve both our problems.
The Salvation Prophecy

Space Combat. Planet Exploration. Strategic Domination.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering in multiple viewports - OGRE

Postby ianstangoe » Wed Nov 18, 2009 09:45

Yeah the 0.6.x version 'just worked' out of the box with multiple viewports, I was using a single scene manager too. I think it automatically rendered on any viewport with overlays enabled.

I'm sure the new version has undocumented functions for achieving this but its like stabbing-in-the-dark at the moment looking at the class list. Hopefully one of the team can point us in the right direction soon... :?

eugen
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Jun 03, 2008 03:29
Contact:

Re: Rendering in multiple viewports - OGRE

Postby eugen » Wed Nov 18, 2009 12:03

0.6 worked out of the box; it used the Overlay render queue and used a different rendering method, now CEGUI 0.7 hooks up into the main rendering queue of Ogre and just renders once regardless the number of viewports. The behavior i have with 0.7its just flickers continuously.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering in multiple viewports - OGRE

Postby ianstangoe » Wed Nov 18, 2009 13:41

Do you mean it flickers with mulitple viewports or just in general, I haven't noticed any flickering yet but not really taxed it with a substantial menu system yet..

eugen
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Jun 03, 2008 03:29
Contact:

Re: Rendering GUI in multiple viewports - OGRE

Postby eugen » Thu Nov 19, 2009 13:05

Only flickers with multiple viewport system, works ok with one viewport

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering GUI in multiple viewports - OGRE

Postby ianstangoe » Thu Nov 19, 2009 17:35

Have you got gui elements cloned in multiple viewports?

eugen
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Jun 03, 2008 03:29
Contact:

Re: Rendering GUI in multiple viewports - OGRE

Postby eugen » Fri Nov 20, 2009 15:17

What do you mean? The gui elements i have are created in CEGUI, the current version of CEGUI doesnt know about multiple viewports when rendering, i dont understand exactly the meaning of your question.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering GUI in multiple viewports - OGRE

Postby ianstangoe » Fri Nov 20, 2009 22:40

In the previous version gui elements were cloned in each viewport, I was wondering if you had gotten this to work with the current version except that it was flickering, I guess this isn't the case.

eugen
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Tue Jun 03, 2008 03:29
Contact:

Re: Rendering GUI in multiple viewports - OGRE

Postby eugen » Sun Nov 22, 2009 21:42

No doesnt seem to be the case, the only thing is the flickering. The GUI works as expected othewise, i can act on the buttons, gui events are sent, evertything seems to work ok. Now that i think of, could i have cause the flickering myself?!

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering GUI in multiple viewports - OGRE

Postby ianstangoe » Mon Nov 23, 2009 20:00

I guess it could be something your doing, I haven't noticed any flickering with my app yet, are you using any of the new features? Are you implementing the new renderer using the helper functions and startRendering/renderOneFrame()?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Rendering GUI in multiple viewports - OGRE

Postby scriptkid » Thu Nov 26, 2009 10:50

Hi,

I had contact with CE about this, and got a reply which i'll try fit into a post :)

To make the problem clear: do you want the CEGUI output in one viewport only, 'cloned' on all viewports, different layouts for each viewport, or something else...? I guess you want GUI on one viewport only, but with the new renderer the default is to render to the entire Ogre::RenderTarget - i.e. ignoring viewports defined in Ogre, which was by design (the fact that you previously had a CEGUI render call for each viewport was horrible and was definitely _not_ by design). The correct solution will (eventually) be to create an appropriate target in CEGUI and use it as the target surface for the layout, though Cegui is not quite there yet. In the interim, it may be possible to create a 'container' CEGUI DefaultWindow that is the same size and position as the target viewport and use it as a host for the actual layout - though this might give issues relating to imagery autoscaling (since it will still be scaled based on the overall render target - though in many cases this may actually be preferable).

As far as the flickering goes, CE's aware of one issue that may cause that (RTT via rending to the front buffer and copying), though the fact it's okay with one viewport would indicate that it's not this. Bugs are also a real possibility due to the way we hook the rendering process for Ogre so that we can automatically call the System::renderGUI function - perhaps a better choice would have been to let the user make this call, which should still be possible for a user to do in special cases. This will have to be tested / demonstrated in order to decide if it's a bug or user error.

HTH!
Check out my released snake game using Cegui!

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: Rendering GUI in multiple viewports - OGRE

Postby ianstangoe » Thu Nov 26, 2009 13:51

Thanks for looking into this scriptkid!

For my purposes I actually need the gui 'cloned' for each viewport, sounds like this isn't implemented currently?

I'm trying to port an existing application to the new version so the dual window workaround is not an option for me, I guess I'm just too eager to have the latest and greatest :lol: I'll hang on until this is implemented.

Thanks.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 6 guests