|
|
|
@ -28,12 +28,20 @@ void OgreRenderer::screenshot(const std::string &file)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool OgreRenderer::configure(bool showConfig,
|
|
|
|
|
const std::string &cfgPath,
|
|
|
|
|
const std::string &logPath,
|
|
|
|
|
const std::string &pluginCfg,
|
|
|
|
|
bool _logging)
|
|
|
|
|
{
|
|
|
|
|
std::string theLogFile("Ogre.log");
|
|
|
|
|
std::string theCfgFile("ogre.cfg");
|
|
|
|
|
|
|
|
|
|
theLogFile.insert(0, logPath);
|
|
|
|
|
theCfgFile.insert(0, cfgPath);
|
|
|
|
|
|
|
|
|
|
// Set up logging first
|
|
|
|
|
new LogManager;
|
|
|
|
|
Log *log = LogManager::getSingleton().createLog("Ogre.log");
|
|
|
|
|
Log *log = LogManager::getSingleton().createLog(theLogFile);
|
|
|
|
|
logging = _logging;
|
|
|
|
|
|
|
|
|
|
if(logging)
|
|
|
|
@ -43,7 +51,7 @@ bool OgreRenderer::configure(bool showConfig,
|
|
|
|
|
// Disable logging
|
|
|
|
|
log->setDebugOutputEnabled(false);
|
|
|
|
|
|
|
|
|
|
mRoot = new Root(pluginCfg, "ogre.cfg", "");
|
|
|
|
|
mRoot = new Root(pluginCfg, theCfgFile, "");
|
|
|
|
|
|
|
|
|
|
// Show the configuration dialog and initialise the system, if the
|
|
|
|
|
// showConfig parameter is specified. The settings are stored in
|
|
|
|
@ -58,6 +66,21 @@ bool OgreRenderer::configure(bool showConfig,
|
|
|
|
|
return !result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool OgreRenderer::configure(bool showConfig,
|
|
|
|
|
const std::string &cfgPath,
|
|
|
|
|
const std::string &pluginCfg,
|
|
|
|
|
bool _logging)
|
|
|
|
|
{
|
|
|
|
|
return configure(showConfig, cfgPath, cfgPath, pluginCfg, _logging);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool OgreRenderer::configure(bool showConfig,
|
|
|
|
|
const std::string &pluginCfg,
|
|
|
|
|
bool _logging)
|
|
|
|
|
{
|
|
|
|
|
return configure(showConfig, "", pluginCfg, _logging);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OgreRenderer::createWindow(const std::string &title)
|
|
|
|
|
{
|
|
|
|
|
assert(mRoot);
|
|
|
|
|