OgrePlatform fails to build against ogre1.9RC

simed

15-09-2013 23:24:43

/usr/local/my-gui/src/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:37:17: No matching constructor for initialization of 'Ogre::HighLevelGpuProgramPtr' (aka 'SharedPtr<Ogre::HighLevelGpuProgram>')

I am getting this building against latest Ogre 1.9 code on iOS. Strangely, on Windows it worked when I update MyGUI to build against ogre 1.9 a few weeks earlier. But I have seen other 3rd-party libs break against shared-pointer issues with ogre 1.9. Is there any reason the code shouldn't build... if not I'll have to double-check my setup.

simed

16-09-2013 09:53:52

On closer inspection:

OgreRenderManager::OgreRenderManager() :
...,
mVertProg(0), mFragProg(0)
{
}
Has to be changed to OgreRenderManager::OgreRenderManager() :
...,
mVertProg((Ogre::HighLevelGpuProgram *)0), mFragProg((Ogre::HighLevelGpuProgram *)0)
{
}
For Mac/iOS build at least, the template argument cannot be deduced. Ogre 1.9 makes some changes to how shared pointers are defined/declared.

Altren

16-09-2013 11:28:32

Actually what you posted here is some modified OgrePlatform sources.
We don't even have such variables in OgrePlatform and we also use nullptr macros to initialize pointers.

simed

16-09-2013 11:37:36

Oops, this was my local GLES fix:

viewtopic.php?f=17&t=29658#p100111

In case anyone else was wondering what was going on!