This sounds good. Do you mean something like this?dark_sylinc wrote:The way you treat the Compositor Workspaces to manage multiple RenderWindows is exactly how it was intended.
Except for one thing: you're creating one CompositorWorkspaceDef per RenderWindow (the calls to createBasicWorkspaceDef). You can share all your workspace instances with the same CompositorWorkspaceDef (unless you want to apply different compositor effects for each window; i.e. enable Bloom in one window and disable it for the other one; or render render queues 0 to 10 in one window, and 5 to 8 in the other window)
You can share the cameras if you like to. If you want multiple cams though, you're doing it the way it was intended
Code: Select all
Ogre::CompositorManager2* pCompositorManager = m_pRoot->getCompositorManager2();
const Ogre::IdString workspaceName = "scene workspace";
pCompositorManager->createBasicWorkspaceDef(workspaceName, Ogre::ColourValue::Black);
for(size_t i = 0; i < m_vCameraLst.size(); i++)
{
Ogre::SceneNode* pn = m_vCameraLst[i]->getParentSceneNode();
pn->detachObject(m_vCameraLst[i]);
m_pEgoSceneNode->attachObject(m_vCameraLst[i]);
pCompositorManager->addWorkspace(m_pSceneMgr, RenderWindowList::getSingletonPtr()->getWindowByIndex(i)->getWindow(), m_vCameraLst[i], workspaceName, true);
}
You already have the answer to my next question (Is it possible to use different compositors for the windows?) Thanks a lot!unless you want to apply different compositor effects for each window; i.e. enable Bloom in one window and disable it for the other one; or render render queues 0 to 10 in one window, and 5 to 8 in the other window
Oh, I'm sorry this is a mistake. I should write it more clearly. My code is a quick & dirty variant to test multiple monitors. This was not addressed to your patch!dark_sylinc wrote:If you think this is "quick"; I've done my job. Also, if you think it's "dirty"; well umm... let's forget you said that!Transporter wrote:this is just a quick & dirty solution.
Edit: You did a very quick job! Great work!