diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index db6edf397..d10ae9979 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -299,6 +299,7 @@ void OMW::Engine::go() mOgre->configure( mCfgMgr.getLogPath().string(), renderSystem, + Settings::Manager::getString("opengl rtt mode", "Video"), false); // This has to be added BEFORE MyGUI is initialized, as it needs diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 8fab98da2..6a77b7fc0 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -24,6 +24,10 @@ antialiasing = none vsync = false +# opengl render to texture mode, valid options: +# PBuffer, FBO, Copy +opengl rtt mode = FBO + [GUI] # 1 is fully opaque menu transparency = 0.84 diff --git a/libs/openengine/ogre/renderer.cpp b/libs/openengine/ogre/renderer.cpp index 65911df34..5f3435c52 100644 --- a/libs/openengine/ogre/renderer.cpp +++ b/libs/openengine/ogre/renderer.cpp @@ -145,6 +145,7 @@ float OgreRenderer::getFPS() void OgreRenderer::configure(const std::string &logPath, const std::string& renderSystem, + const std::string& rttMode, bool _logging) { // Set up logging first @@ -198,6 +199,9 @@ void OgreRenderer::configure(const std::string &logPath, if (rs == 0) throw std::runtime_error ("RenderSystem with name " + renderSystem + " not found, make sure the plugins are loaded"); mRoot->setRenderSystem(rs); + + if (rs->getName().find("OpenGL") != std::string::npos) + rs->setConfigOption ("RTT Preferred Mode", rttMode); } void OgreRenderer::createWindow(const std::string &title, const WindowSettings& settings) diff --git a/libs/openengine/ogre/renderer.hpp b/libs/openengine/ogre/renderer.hpp index 95bcac3b8..a8788dfca 100644 --- a/libs/openengine/ogre/renderer.hpp +++ b/libs/openengine/ogre/renderer.hpp @@ -132,6 +132,7 @@ namespace OEngine void configure( const std::string &logPath, // Path to directory where to store log files const std::string &renderSystem, + const std::string &rttMode, bool _logging); // Enable or disable logging /// Create a window with the given title