Allow changing OpenGL RTT mode, useful for example if the driver reports incorrect capabilities

actorid
scrawl 12 years ago
parent 4b5706d652
commit 32de090079

@ -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

@ -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

@ -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)

@ -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

Loading…
Cancel
Save