In an application where you have more than one viewport each rendering completely unrelated scenes I believe you'd have to create a new Root, a new SceneManager, etc. Due to the internal usage of singletons in Ogre that's not possible. What's the correct way of doing this? I have searched but could not find any conclusive discussion in the forums.
Thanks
Creating multiple Roots
-
- Halfling
- Posts: 83
- Joined: Sun Feb 21, 2010 4:58 pm
- x 28
Re: Creating multiple Roots
So I guess I am supposed to create multiple SceneManagers and associate them with their respective RenderWindow via the CompositorManager2 from the same Root, using addWorkspace. Though Ogre::Root::renderOneFrame will update and render all workspaces/viewports. What if I want to update/render only one of them?
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: Creating multiple Roots
iirc that's the way to do it. and you can disable rendering on one window just by calling workspace->setEnabled( false )
-
- Halfling
- Posts: 83
- Joined: Sun Feb 21, 2010 4:58 pm
- x 28