Creating multiple Roots

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
xissburg
Halfling
Posts: 83
Joined: Sun Feb 21, 2010 4:58 pm
x 28

Creating multiple Roots

Post 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
xissburg
Halfling
Posts: 83
Joined: Sun Feb 21, 2010 4:58 pm
x 28

Re: Creating multiple Roots

Post 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?
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Re: Creating multiple Roots

Post by xrgo »

iirc that's the way to do it. and you can disable rendering on one window just by calling workspace->setEnabled( false )
xissburg
Halfling
Posts: 83
Joined: Sun Feb 21, 2010 4:58 pm
x 28

Re: Creating multiple Roots

Post 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.
Post Reply