Page 1 of 1

Creating multiple Roots

Posted: Wed Aug 07, 2019 4:22 pm
by xissburg
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

Re: Creating multiple Roots

Posted: Wed Aug 07, 2019 5:12 pm
by xissburg
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?

Re: Creating multiple Roots

Posted: Wed Aug 07, 2019 5:56 pm
by xrgo
iirc that's the way to do it. and you can disable rendering on one window just by calling workspace->setEnabled( false )

Re: Creating multiple Roots

Posted: Thu Aug 08, 2019 3:23 pm
by xissburg
xrgo wrote: Wed Aug 07, 2019 5:56 pm iirc that's the way to do it. and you can disable rendering on one window just by calling workspace->setEnabled( false )
Yeah I am gonna give that a try. Thanks.