mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 12:07:51 +03:00
Set up OGRE window and config reading
This commit is contained in:
parent
dc2c9f06d0
commit
2d3a56a464
10 changed files with 88 additions and 77 deletions
|
@ -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, "");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue