1 UI, X Scenes, X Viewports

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Posts: 196
Joined: Tue Jan 27, 2009 12:27 am

1 UI, X Scenes, X Viewports

Post by N0vember » Thu Nov 13, 2014 2:57 pm

I'm trying to draw an outline of a system to draw to the screen a number of viewports rendering different scenes, and an overarching UI that is not bound to either scene.

This is the only practical way for now.
For now the design consists of :
- 1 SceneManager for the UI
- 1 Basic Workspace for the UI, fullscreen, render to RenderWindow
- 1 SceneManager per Scene
- 1 Workspace per Camera/Viewport, fullscreen, render to a Texture
- Manually draw textured quads to the UI scene (order doesn't matter as the SceneManager is empty apart from the UI)
Question : This last manual part could maybe replaced by compositing in the UI workspace ?

B. Direct-To-Screen ?
I was wondering if I could use somehow the new Compositor system to achieve the same result directly drawing to the screen without intermediary textures, but it seems tricky.
The viewports are easy to draw :
- 1 SceneManager per Scene
- 1 Workspace per Scene, render the Camera/Viewports to different parts of the RenderWindow.
The hard part is the UI. I imagine I cannot provide a custom pass to these Workspaces since I want to draw on top of them both, at once, on the whole screen. I shouldn't draw it twice or thrice.
So I suppose I need to setup one Workspace for the UI,again. So it will be bound to a UI-only SceneManager again like in the RTT solution.

But, first problem, the UI compositor would need to clear itself after the Viewports have been cleared but before they are drawn. Is that even technically possible ? Or does it just explains how rendering all that directly to screen is simply impossible ?
I am interested also in any alternative between these two designs to achieve the same result : over arching UI, multiple scenes/viewports.
Or any criticism : maybe the first option is just the best one already and I don't need to bother myself...
0 x

Post Reply