|
|
@ -11,6 +11,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <extern/sdl4ogre/sdlwindowhelper.hpp>
|
|
|
|
#include <extern/sdl4ogre/sdlwindowhelper.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/ogreinit/ogreinit.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
#include <cassert>
|
|
|
|
#include <stdexcept>
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
|
|
|
|
|
@ -23,6 +25,12 @@ void OgreRenderer::cleanup()
|
|
|
|
delete mFader;
|
|
|
|
delete mFader;
|
|
|
|
mFader = NULL;
|
|
|
|
mFader = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ogre::Root::getSingleton().destroyRenderTarget(mWindow);
|
|
|
|
|
|
|
|
mWindow = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
delete mOgreInit;
|
|
|
|
|
|
|
|
mOgreInit = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
// If we don't do this, the desktop resolution is not restored on exit
|
|
|
|
// If we don't do this, the desktop resolution is not restored on exit
|
|
|
|
SDL_SetWindowFullscreen(mSDLWindow, 0);
|
|
|
|
SDL_SetWindowFullscreen(mSDLWindow, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -50,7 +58,8 @@ void OgreRenderer::configure(const std::string &logPath,
|
|
|
|
const std::string& rttMode
|
|
|
|
const std::string& rttMode
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mRoot = mOgreInit.init(logPath + "/ogre.log");
|
|
|
|
mOgreInit = new OgreInit::OgreInit();
|
|
|
|
|
|
|
|
mRoot = mOgreInit->init(logPath + "/ogre.log");
|
|
|
|
|
|
|
|
|
|
|
|
RenderSystem* rs = mRoot->getRenderSystemByName(renderSystem);
|
|
|
|
RenderSystem* rs = mRoot->getRenderSystemByName(renderSystem);
|
|
|
|
if (rs == 0)
|
|
|
|
if (rs == 0)
|
|
|
|