本文整理汇总了C++中MaterialManager::initialise方法的典型用法代码示例。如果您正苦于以下问题:C++ MaterialManager::initialise方法的具体用法?C++ MaterialManager::initialise怎么用?C++ MaterialManager::initialise使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaterialManager
的用法示例。
在下文中一共展示了MaterialManager::initialise方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setUp
void MeshWithoutIndexDataTests::setUp()
{
LogManager::getSingleton().createLog("MeshWithoutIndexDataTests.log", true);
OGRE_NEW ResourceGroupManager();
OGRE_NEW LodStrategyManager();
mBufMgr = OGRE_NEW DefaultHardwareBufferManager();
mMeshMgr = OGRE_NEW MeshManager();
archiveMgr = OGRE_NEW ArchiveManager();
archiveMgr->addArchiveFactory(OGRE_NEW FileSystemArchiveFactory());
MaterialManager* matMgr = OGRE_NEW MaterialManager();
matMgr->initialise();
}
示例2: setUp
void MeshSerializerTests::setUp()
{
errorFactor = 0.05;
OGRE_DELETE LogManager::getSingletonPtr();
mLogManager = OGRE_NEW LogManager();
mLogManager->createLog("MeshWithoutIndexDataTests.log", false);
mLogManager->setLogDetail(LL_LOW);
mFSLayer = OGRE_NEW_T(Ogre::FileSystemLayer, Ogre::MEMCATEGORY_GENERAL)(OGRE_VERSION_NAME);
OGRE_NEW ResourceGroupManager();
OGRE_NEW LodStrategyManager();
OGRE_NEW DefaultHardwareBufferManager();
OGRE_NEW MeshManager();
OGRE_NEW SkeletonManager();
ArchiveManager* archiveMgr = OGRE_NEW ArchiveManager();
archiveMgr->addArchiveFactory(OGRE_NEW FileSystemArchiveFactory());
MaterialManager* matMgr = OGRE_NEW MaterialManager();
matMgr->initialise();
// Load resource paths from config file
ConfigFile cf;
String resourcesPath;
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
resourcesPath = mFSLayer->getConfigFilePath("resources.cfg");
#else
resourcesPath = mFSLayer->getConfigFilePath("bin/resources.cfg");
#endif
// Go through all sections & settings in the file
cf.load(resourcesPath);
ConfigFile::SectionIterator seci = cf.getSectionIterator();
String secName, typeName, archName;
while (seci.hasMoreElements()) {
secName = seci.peekNextKey();
ConfigFile::SettingsMultiMap* settings = seci.getNext();
ConfigFile::SettingsMultiMap::iterator i;
for (i = settings->begin(); i != settings->end(); ++i) {
typeName = i->first;
archName = i->second;
if (typeName == "FileSystem") {
ResourceGroupManager::getSingleton().addResourceLocation(
archName, typeName, secName);
}
}
}
mMesh = MeshManager::getSingleton().load("knot.mesh", ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
getResourceFullPath(mMesh, mMeshFullPath);
if (!copyFile(mMeshFullPath + ".bak", mMeshFullPath)) {
// If there is no backup, create one.
copyFile(mMeshFullPath, mMeshFullPath + ".bak");
}
mSkeletonFullPath = "";
mSkeleton = SkeletonManager::getSingleton().load("jaiqua.skeleton", "Popular").staticCast<Skeleton>();
getResourceFullPath(mSkeleton, mSkeletonFullPath);
if (!copyFile(mSkeletonFullPath + ".bak", mSkeletonFullPath)) {
// If there is no backup, create one.
copyFile(mSkeletonFullPath, mSkeletonFullPath + ".bak");
}
mMesh->reload();
#ifdef OGRE_BUILD_COMPONENT_MESHLODGENERATOR
{
MeshLodGenerator().generateAutoconfiguredLodLevels(mMesh);
}
#endif /* ifdef OGRE_BUILD_COMPONENT_MESHLODGENERATOR */
mOrigMesh = mMesh->clone(mMesh->getName() + ".orig.mesh", mMesh->getGroup());
}