mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 21:42:13 +00:00
Simple Debugging class
This commit is contained in:
parent
47593f3641
commit
30ba9b74da
@ -18,6 +18,24 @@
|
||||
using namespace MWRender;
|
||||
using namespace Ogre;
|
||||
|
||||
Debugging::Debugging(OEngine::Physic::PhysicEngine* engine){
|
||||
eng = engine;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
MWScene::MWScene(OEngine::Render::OgreRenderer &_rend , OEngine::Physic::PhysicEngine* physEng)
|
||||
: rend(_rend)
|
||||
{
|
||||
|
@ -28,6 +28,15 @@ namespace MWRender
|
||||
{
|
||||
class Player;
|
||||
|
||||
class Debugging{
|
||||
OEngine::Physic::PhysicEngine* eng;
|
||||
|
||||
|
||||
public:
|
||||
Debugging(OEngine::Physic::PhysicEngine* engine);
|
||||
bool toggleRenderMode (int mode);
|
||||
};
|
||||
|
||||
/// \brief 3D-scene (rendering and physics)
|
||||
|
||||
class MWScene
|
||||
|
@ -34,6 +34,8 @@ namespace MWWorld
|
||||
namespace MWRender
|
||||
{
|
||||
class Player;
|
||||
|
||||
|
||||
class RenderingManager {
|
||||
|
||||
OEngine::Render::OgreRenderer &rend;
|
||||
|
Loading…
Reference in New Issue
Block a user