mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-03 23:56:47 +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 MWRender;
 | 
				
			||||||
using namespace Ogre;
 | 
					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)
 | 
					MWScene::MWScene(OEngine::Render::OgreRenderer &_rend , OEngine::Physic::PhysicEngine* physEng)
 | 
				
			||||||
    : rend(_rend)
 | 
					    : rend(_rend)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,15 @@ namespace MWRender
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    class Player;
 | 
					    class Player;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						class Debugging{
 | 
				
			||||||
 | 
						OEngine::Physic::PhysicEngine* eng;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						public:
 | 
				
			||||||
 | 
							Debugging(OEngine::Physic::PhysicEngine* engine);
 | 
				
			||||||
 | 
							bool toggleRenderMode (int mode);
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// \brief 3D-scene (rendering and physics)
 | 
					    /// \brief 3D-scene (rendering and physics)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    class MWScene
 | 
					    class MWScene
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,6 +34,8 @@ namespace MWWorld
 | 
				
			||||||
namespace MWRender
 | 
					namespace MWRender
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	class Player;
 | 
						class Player;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class RenderingManager {
 | 
					class RenderingManager {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	 OEngine::Render::OgreRenderer &rend;
 | 
						 OEngine::Render::OgreRenderer &rend;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue