本文整理汇总了C++中ogre::Root::loadInnerPlugins方法的典型用法代码示例。如果您正苦于以下问题:C++ Root::loadInnerPlugins方法的具体用法?C++ Root::loadInnerPlugins怎么用?C++ Root::loadInnerPlugins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::Root
的用法示例。
在下文中一共展示了Root::loadInnerPlugins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Initial
//初始化
VOID CRenderSystem::Initial(VOID* pParam)
{
#if (_MSC_VER >= 1400)
// std::locale langLocale("");
// std::locale::global(langLocale);
setlocale( LC_CTYPE, "" );
#endif
//---------------------------------------------------------
//取得渲染窗口句柄
TDAssert(pParam);
HWND hMainWnd = *((HWND*)pParam);
g_hMainWnd = hMainWnd;
g_pVaribleSys = (tVariableSystem*)g_pKernel->GetNode("bin\\var");
TDAssert(g_pVaribleSys);
g_pEventSys = (tEventSystem*)g_pKernel->GetNode("bin\\event");
TDAssert(g_pEventSys);
//---------------------------------------------------------
//初始化RenderSystem
m_pRenderSystem->init("WXResources.cfg", "", "", "WXRender.log");
//---------------------------------------------------------
//加载OGRE插件
g_pDebuger = (tDebuger*)g_pKernel->GetNode("bin\\debuger");
g_pSoundSystem = (tSoundSystem*)g_pKernel->GetNode("bin\\snd");
TDAssert(g_pSoundSystem);
g_pWorldSystem = (tWorldSystem*)g_pKernel->GetNode("bin\\worldman");
TDAssert(g_pWorldSystem);
g_pTimeSystem = (tTimeSystem*)g_pKernel->GetNode("bin\\time");
TDAssert(g_pTimeSystem);
g_pResourceProvider = (CResourceProvider*)g_pKernel->GetNode("bin\\resprovider");
TDAssert(g_pResourceProvider);
//STRING str = g_pVaribleSys->GetAs_String("Gfx_API");
Ogre::Root* pTheRoot = &(Ogre::Root::getSingleton());
//选择渲染系统
//if(stricmp(g_pVaribleSys->GetAs_String("Gfx_API").c_str(), "Direct3D") == 0)
//{
// pTheRoot->loadPlugin("RenderSystem_Direct3D9.dll");
// pTheRoot->setRenderSystem(pTheRoot->getRenderSystemByName("Direct3D9 Rendering Subsystem"));
//}
//else if(stricmp(g_pVaribleSys->GetAs_String("Gfx_API").c_str(), "OpenGL") == 0)
//{
// TDThrow("Don't Support GL RenderSystem!");
// //pTheRoot->loadPlugin("RenderSystem_GL.dll");
// //pTheRoot->setRenderSystem(pTheRoot->getRenderSystemByName("OpenGL Rendering Subsystem"));
//}
//else
// TDThrow("UnKnown RenderSystem!");
//使用D3D渲染
pTheRoot->loadRenderPlugins_D3D9();
//加载其他插件
pTheRoot->loadInnerPlugins();
//pTheRoot->loadPlugin("Plugin_ParticleFX.dll");
//pTheRoot->loadPlugin("Plugin_ParticleFX2.dll");
//pTheRoot->loadPlugin("Plugin_OctreeSceneManager.dll");
//pTheRoot->loadPlugin("Plugin_CgProgramManager.dll");
//分析资源
ScriptParsingListener listener;
try
{
//传入渲染窗口句柄
WX::System::NameValuePairList ViewSetting;
INT nFSAA = g_pVaribleSys->GetAs_Int(szFSAAVar);
INT nVsync = g_pVaribleSys->GetAs_Int(szvsyncVar);
switch(nFSAA)
{
case 0:
ViewSetting["FSAA"] = Ogre::StringConverter::toString(0);
break;
case 1:
ViewSetting["FSAA"] = Ogre::StringConverter::toString(2);
break;
case 2:
ViewSetting["FSAA"] = Ogre::StringConverter::toString(4);
break;
default:
ViewSetting["FSAA"] = Ogre::StringConverter::toString(0);
break;
}
if(nVsync == 1)
ViewSetting["vsync"] = "true";
else
ViewSetting["vsync"] = "false";
m_pRenderSystem->setup((WX::ulong)(UINT_PTR)g_hMainWnd, &ViewSetting);
//.........这里部分代码省略.........