OGRE 资源载入

来源:互联网 发布:百度云直链3.0php源码 编辑:程序博客网 时间:2024/05/17 00:18

 

OGRE例子中载入资源

ExampleApplication:: setupResources

利用ConfigFile导入resources.cfg

然后通过ResourceGroupManager将配置文件中指定的资源组织成ResourceGroup,加入到其成员mResourceGroupMap中

 

  1. void  ResourceGroupManager::addResourceLocation(const String& name, 
  2.         const String& locType, const String& resGroup, bool recursive)
  3. {
  4.     //创建档案
  5.     Archive* pArch = ArchiveManager::getSingleton().load( name, locType );
  6.     //将档案加入到资源组
  7.     ResourceGroup* grp = getResourceGroup(resGroup);
  8. grp->locationList.push_back(loc);  //loc由pArch 组成
  9. }

 

 

原创粉丝点击