[Ogre2.0] MyGUI Not rendering


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.

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);
Ogre::CompositorTargetDef *targetDef = nodeDef->addTargetPass("WindowRT");
Ogre::CompositorPassClearDef* passClear = static_cast<Ogre::CompositorPassClearDef*>
Ogre::CompositorPassSceneDef *passScene = static_cast<Ogre::CompositorPassSceneDef*>
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

I have nothing unusual in the logs. (Both Ogre and MyGUI)


15-06-2015 19:44:02

You should use Ogre2.0 branch from github https://github.com/MyGUI/mygui
Ogre 2.0 support is still in beta and not merged into main sources branch.


15-06-2015 20:59:35

Yes, I'm using that one, but I fixed my problem. I didn't load the resource files before the initialization..


16-05-2016 20:49:42

I'm having similar problems while trying to upgrade from 1.10 to 2.0. I am using the same code as in BaseManager::createGui() and I'm getting an access violation on the line: -

targetDef->addPass(Ogre::PASS_CUSTOM, MyGUI::OgreCompositorPassProvider::mPassId);

Any ideas what I could be doing wrong? There are no errors in either the ogre or the mygui logs.

The exception is : - ( Exception thrown at 0x00A4C7A4 in Orc.exe: 0xC0000005: Access violation reading location 0x00000007. )

Is there anything else that needs to change for Ogre 2.0? I am using the directx9 render system by the way.



29-08-2016 06:36:59

latest version of mygui is compatible with ogre 2.1?