我正在基于基本的食人魔教程编写自己的食人魔应用程序。
没有人知道没有第一个安装对话框的情况下启动OgreRenderWindow的方法吗?
我知道Ogre Basic tutorial 6,但是它不起作用。
谢谢4帮助
最佳答案
对于较新版本的Ogre,上述解决方案将无法使用。
您可以执行以下操作...。
#if defined OIS_LINUX_PLATFORM
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_ParticleFX");
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_CgProgramManager");
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_OctreeSceneManager");
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_PCZSceneManager");
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_OctreeZone");
mRoot->loadPlugin("/usr/lib/OGRE/Plugin_BSPSceneManager");
mRoot->loadPlugin("/usr/lib/OGRE/RenderSystem_GL");
#endif
Ogre::RenderSystemList::const_iterator renderers = mRoot->getAvailableRenderers().begin();
while(renderers != mRoot->getAvailableRenderers().end())
{
Ogre::String rName = (*renderers)->getName();
if (rName == "OpenGL Rendering Subsystem")
break;
renderers++;
}
Ogre::RenderSystem *renderSystem = *renderers;
renderSystem->setConfigOption("Full Screen","No");
renderSystem->setConfigOption("Video Mode","1024 x 768 @ 32-bit colour");
renderSystem->setConfigOption("Display Frequency","50 Hz");
renderSystem->setConfigOption("FSAA","16");
renderSystem->setConfigOption("Fixed Pipeline Enabled","Yes");
renderSystem->setConfigOption("RTT Preferred Mode","FBO");
renderSystem->setConfigOption("VSync","No");
renderSystem->setConfigOption("sRGB Gamma Conversion","No");
mRoot->setRenderSystem(renderSystem);
// Create a render window
mWindow = mRoot->initialise(true, "MyGame v0.0.1");