I've recently started the process of upgrading my app to the latest version of Ogre -1.12.9 (from 1.10.11). I think I'm almost done but my dynamic resource loading stopped working. It use to be super simple:
I understand that having a blocking resource loading call is not the greatest way to go, but man, sometimes you just don't care right? Is there still a way to do that with the latest version?
i'm on 1.12.9 and i load every type of resource there is on the fly so the good news is it works.
what is failing and what is the error message?
you might need to trigger the load directly after declaring the resource:
auto& textures = Ogre::TextureManager::getSingleton ();
auto texture = textures.load (name, RESOURCE_GROUP);
!!!!Ogre::Exception!!!!Ogre::FileNotFoundException::FileNotFoundException: Cannot locate resource ...FILE_PATH\FILE_NAME.tga in resource group General. in ResourceGroupManager::openResource at OGRE_PATH\OgreMain\src\OgreResourceGroupManager.cpp (line 705)
Assumes the resource is already part of the resource group while mine does not.
This use to work without issue on 1.10.11. There has to be a simple way to add a resource to a group on the fly and then load it to memory (Image in my case).
This was also the case with 1.10, but it would fall-back and scan the FileSystem after a miss in the index. You can get that behaviour back with OGRE_RESOURCEMANGER_STRICT=0.
The better solution would be to create a separate resource group for transient resources and delete/ re-create it as needed.