Set up OGRE window and config reading

This commit is contained in:
Nicolay Korslund 2010-06-03 21:51:59 +02:00
parent dc2c9f06d0
commit 2d3a56a464
10 changed files with 88 additions and 77 deletions

View file

@ -1,10 +1,18 @@
#include "render.hpp"
#include "renderer.hpp"
using namespace Ogre;
using namespace Render;
void OgreRenderer::cleanup()
{
if(mRoot)
delete mRoot;
mRoot = NULL;
}
bool OgreRenderer::configure(bool showConfig,
const std::string &pluginCfg,
bool _logging);
bool _logging)
{
// Set up logging first
new LogManager;
@ -18,7 +26,7 @@ bool OgreRenderer::configure(bool showConfig,
// Disable logging
log->setDebugOutputEnabled(false);
mRoot = new Root(plugincfg, "ogre.cfg", "");
mRoot = new Root(pluginCfg, "ogre.cfg", "");
// Show the configuration dialog and initialise the system, if the
// showConfig parameter is specified. The settings are stored in
@ -32,3 +40,9 @@ bool OgreRenderer::configure(bool showConfig,
return !result;
}
void OgreRenderer::createWindow(const std::string &title)
{
// Initialize OGRE window
mWindow = mRoot->initialise(true, title, "");
}