Rendering GUI in multiple viewports - OGRE
Moderators: CEGUI MVP, CEGUI Team
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Rendering GUI in multiple viewports - OGRE
How do I setup the OgreRenderer to render gui elements onto multiple viewports of my choosing?
Thanks.
Thanks.
Last edited by ianstangoe on Wed Nov 18, 2009 14:30, edited 1 time in total.
- Jabberwocky
- Quite a regular
- Posts: 86
- Joined: Wed Oct 31, 2007 18:16
- Location: Canada
- Contact:
Re: Rendering in multiple viewports - OGRE
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.
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.
Space Combat. Planet Exploration. Strategic Domination.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering in multiple viewports - OGRE
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.
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.
- Jabberwocky
- Quite a regular
- Posts: 86
- Joined: Wed Oct 31, 2007 18:16
- Location: Canada
- Contact:
Re: Rendering in multiple viewports - OGRE
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 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.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering in multiple viewports - OGRE
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...
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...
Re: Rendering in multiple viewports - OGRE
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.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering in multiple viewports - OGRE
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..
Re: Rendering GUI in multiple viewports - OGRE
Only flickers with multiple viewport system, works ok with one viewport
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering GUI in multiple viewports - OGRE
Have you got gui elements cloned in multiple viewports?
Re: Rendering GUI in multiple viewports - OGRE
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.
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering GUI in multiple viewports - OGRE
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.
Re: Rendering GUI in multiple viewports - OGRE
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?!
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering GUI in multiple viewports - OGRE
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()?
- scriptkid
- 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
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!
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!
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: Rendering GUI in multiple viewports - OGRE
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 I'll hang on until this is implemented.
Thanks.
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 I'll hang on until this is implemented.
Thanks.
Who is online
Users browsing this forum: No registered users and 16 guests