2011-10-25 18:06:44 +00:00
|
|
|
#include "debugging.hpp"
|
2010-06-05 18:37:01 +00:00
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
2010-06-06 11:36:45 +00:00
|
|
|
#include "OgreRoot.h"
|
|
|
|
#include "OgreRenderWindow.h"
|
|
|
|
#include "OgreSceneManager.h"
|
|
|
|
#include "OgreViewport.h"
|
|
|
|
#include "OgreCamera.h"
|
|
|
|
#include "OgreTextureManager.h"
|
|
|
|
|
2010-08-25 07:19:15 +00:00
|
|
|
#include "../mwworld/world.hpp" // these includes can be removed once the static-hack is gone
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
#include <components/esm/loadstat.hpp>
|
|
|
|
|
2011-01-08 14:11:37 +00:00
|
|
|
#include "player.hpp"
|
|
|
|
|
2010-06-08 11:53:34 +00:00
|
|
|
using namespace MWRender;
|
2010-06-05 18:37:01 +00:00
|
|
|
using namespace Ogre;
|
|
|
|
|
2011-10-22 04:15:15 +00:00
|
|
|
Debugging::Debugging(OEngine::Physic::PhysicEngine* engine){
|
|
|
|
eng = engine;
|
|
|
|
}
|
|
|
|
|
2011-10-24 17:42:36 +00:00
|
|
|
|
2011-10-22 04:15:15 +00:00
|
|
|
bool Debugging::toggleRenderMode (int mode){
|
|
|
|
switch (mode)
|
|
|
|
{
|
|
|
|
case MWWorld::World::Render_CollisionDebug:
|
|
|
|
|
|
|
|
// TODO use a proper function instead of accessing the member variable
|
|
|
|
// directly.
|
|
|
|
eng->setDebugRenderingMode (!eng->isDebugCreated);
|
|
|
|
return eng->isDebugCreated;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|