Cannot convert from 'Ogre::ResourcePtr' to 'std::shared_ptr<Ogre::Material>

Problems building or running the engine, queries about how to use features etc.
Post Reply
AdityaM
Gnoblar
Posts: 5
Joined: Thu Oct 03, 2019 6:08 am

Cannot convert from 'Ogre::ResourcePtr' to 'std::shared_ptr<Ogre::Material>

Post by AdityaM » Wed Oct 09, 2019 1:34 pm

Ogre Version: 1.10
Operating System: Win10
Render System: Opengl

This is one of the last few errors remaining
When trying to Upgrade from Ogre 1.8.0 to 1.10. i

Code: Select all

cannot convert from 'Ogre::ResourcePtr' to 'std::shared_ptr<Ogre::Material>
when using

Code: Select all

Ogre::MaterialPtr baseMaterial = Ogre::MaterialManager::getSingleton().createOrRetrieve(
		/* the name of the base material */ "baseMaterial",
		Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME).first;
but this

Code: Select all

Ogre::MaterialPtr baseMaterial = Ogre::MaterialManager::getSingleton().getByName("3dk/material");
works just fine.

Couldn't find any direct methods for proper casting or conversion any clues?

Thanks and Regards :mrgreen:
0 x


Post Reply