I'm using Ogre commit 99effb28b8ec (2015-08-12 18:55:16 -0300) and MyGui commit f63f0156724b (2015-08-11 14:30:08 +0300).
As I said before I had trouble running the samples, having random crashes at startup. I managed to find the problem. It's a bug in Ogre but I think MyGui could have an extra error log or an assertion fail.
The problem is when installing the custom compositor pass provider.
This fragment is from MyGui's OgreRenderManager::initialise function:
Code: Select all
Ogre::CompositorManager2* pCompositorManager = Ogre::Root::getSingleton().getCompositorManager2();
// don't overwrite a custom pass provider that the user may have registered already
if (!pCompositorManager->getCompositorPassProvider())
pCompositorManager->setCompositorPassProvider(mPassProvider.get());
Now for the bug... it turns out that Ogre doesn't initialize the pass provider variable. In my case that variable was most of the time containing grabage. So MyGui didn't install its custom pass provider, and later when MyGui tried to install the custom pass, Ogre crashed while trying to call the pas provider. Simply adding this line in Ogre's CompositorManager2 fixed the problem:
Code: Select all
CompositorManager2::CompositorManager2( RenderSystem *renderSystem ) :
mFrameCount( 0 ),
mRenderSystem( renderSystem ),
mSharedTriangleFS( 0 ),
mSharedQuadFS( 0 ),
mDummyObjectMemoryManager( 0 ),
mCompositorPassProvider(0) // <<<<<<<<
{