Rewrite asset loading / resource groups to be simpler
Posted: Mon Nov 28, 2011 8:50 pm
I'm putting out a request to rewrite the loader.
IMO, The loader as it stands is overly complicated, and adds an extra layers of complexity where a simple layer will do. Although the Archive, ResourceGroup, Resource loader system *can* make it simple to override normal cases, working with edge cases, or situations in which things like file-indexing, pre-loading and preparsing are not available or not the best solution, the Ogre asset loader is nigh impossible to overload without significant headache.
I think the Ogre asset loader should be able to support a simple load request on all asset / resource types. E.g. the following should work out of the box with no other calls to the ResourceManager
This means this loader should:
[*] Search archived groups if they're being used for the mesh, then touch the file system from the CWD to load the mesh.
[*] Grab skeletons starting from the directory containing the mesh, allowing the use or relative path names
[*] On demand load mentioned materials, whether or not they are indexed in the initial material search, starting at the directory of the mesh, and moving to search other directories after.
Doing this in the current system requires you override 3 (maybe more) listeners and hack around the way Ogre wants to manage assets. Why can't this just be simpler?
IMO, The loader as it stands is overly complicated, and adds an extra layers of complexity where a simple layer will do. Although the Archive, ResourceGroup, Resource loader system *can* make it simple to override normal cases, working with edge cases, or situations in which things like file-indexing, pre-loading and preparsing are not available or not the best solution, the Ogre asset loader is nigh impossible to overload without significant headache.
I think the Ogre asset loader should be able to support a simple load request on all asset / resource types. E.g. the following should work out of the box with no other calls to the ResourceManager
Code: Select all
dino = pSceneManager->createEntity("Dino", "assets/Dino/dino.mesh");
[*] Search archived groups if they're being used for the mesh, then touch the file system from the CWD to load the mesh.
[*] Grab skeletons starting from the directory containing the mesh, allowing the use or relative path names
[*] On demand load mentioned materials, whether or not they are indexed in the initial material search, starting at the directory of the mesh, and moving to search other directories after.
Doing this in the current system requires you override 3 (maybe more) listeners and hack around the way Ogre wants to manage assets. Why can't this just be simpler?