mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 00:26:45 +00:00 
			
		
		
		
	Simple Debugging class
This commit is contained in:
		
							parent
							
								
									47593f3641
								
							
						
					
					
						commit
						30ba9b74da
					
				
					 3 changed files with 29 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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 a new issue