Max98
12-06-2015 16:01:59
So, I've been upgrading my project and after I've updated MyGUI, it seems like it's not rendering.
I've used the exact same Compositor code that I found in MyGUI's common base, and still nothing shows up.
I have nothing unusual in the logs. (Both Ogre and MyGUI)
I've used the exact same Compositor code that I found in MyGUI's common base, and still nothing shows up.
mPlatform = new MyGUI::OgrePlatform();
mPlatform->initialise(RoR::Application::GetOgreSubsystem()->GetRenderWindow(), ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
const Ogre::String workspaceName = "scene workspace";
const Ogre::IdString workspaceNameHash = workspaceName;
Ogre::CompositorManager2* pCompositorManager = Ogre::Root::getSingleton().getCompositorManager2();
Ogre::CompositorNodeDef *nodeDef = pCompositorManager->addNodeDefinition("myworkspace");
//Input texture
nodeDef->addTextureSourceName("WindowRT", 0, Ogre::TextureDefinitionBase::TEXTURE_INPUT);
nodeDef->setNumTargetPass(1);
{
Ogre::CompositorTargetDef *targetDef = nodeDef->addTargetPass("WindowRT");
targetDef->setNumPasses(3);
{
{
Ogre::CompositorPassClearDef* passClear = static_cast<Ogre::CompositorPassClearDef*>
(targetDef->addPass(Ogre::PASS_CLEAR));
Ogre::CompositorPassSceneDef *passScene = static_cast<Ogre::CompositorPassSceneDef*>
(targetDef->addPass(Ogre::PASS_SCENE));
passScene->mShadowNode = Ogre::IdString();
// For the MyGUI pass
targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);
}
}
}
Ogre::CompositorWorkspaceDef *workDef = pCompositorManager->addWorkspaceDefinition(workspaceName);
workDef->connectOutput(nodeDef->getName(), 0);
pCompositorManager->addWorkspace(gEnv->sceneManager, Application::GetOgreSubsystem()->GetRenderWindow(), gEnv->mainCamera, workspaceNameHash, true);
mGUI = new MyGUI::Gui();
// empty init
mGUI->initialise(mResourceFileName);
I have nothing unusual in the logs. (Both Ogre and MyGUI)