OGRE例子中载入资源
ExampleApplication:: setupResources
利用ConfigFile导入resources.cfg
然后通过ResourceGroupManager将配置文件中指定的资源组织成ResourceGroup,加入到其成员mResourceGroupMap中
- void ResourceGroupManager::addResourceLocation(const String& name,
- const String& locType, const String& resGroup, bool recursive)
- {
- //创建档案
- Archive* pArch = ArchiveManager::getSingleton().load( name, locType );
- //将档案加入到资源组
- ResourceGroup* grp = getResourceGroup(resGroup);
- grp->locationList.push_back(loc); //loc由pArch 组成
- }