Operating System: :Windows 10:
Render System: :D3D9, OpenGL:
I have an animated mesh that has a generated texture image applied like this:
Code: Select all
{
// Use the original material as a template, clone it and update the texture image
// http://www.ogre3d.org/forums/viewtopic.php?f=21&t=64635
Ogre::MaterialManager &mm = Ogre::MaterialManager::getSingleton();
// Get an existing material
Ogre::MaterialPtr mat = mm.getByName(materialName);
if(!mat)
{
Ogre::MaterialPtr templateMat = mm.getByName(templateMaterialName);
assert(templateMat);
mat = templateMat->clone(materialName);
m_materialNames.push_back(materialName);
bool ok = mat->applyTextureAliases(texNameList);
assert(ok);
Ogre::TextureManager &tm = Ogre::TextureManager::getSingleton();
Ogre::AliasTextureNamePairList::iterator iend = texNameList.end();
for(Ogre::AliasTextureNamePairList::iterator i = texNameList.begin(); i != iend; ++i)
{
tm.unload(i->second);
}
mat->load();
This was working on 1.10.
Reading through the notes at https://github.com/OGRECave/ogre/blob/m ... 1-Notes.md there doesn't seem to be anything that is relevant, but I may be misunderstanding it.
Any ideas what might be going wrong?