]> git.lizzy.rs Git - irrlicht.git/commitdiff
Drop _IRR_SCENEMANAGER_DEBUG
authornumzero <numzer0@yandex.ru>
Wed, 22 Feb 2023 17:13:55 +0000 (20:13 +0300)
committernumzero <numzer0@yandex.ru>
Wed, 22 Feb 2023 18:11:12 +0000 (21:11 +0300)
include/IrrCompileConfig.h
source/Irrlicht/CSceneManager.cpp

index 0259399c132e4610ea7d211cca677ad1f7b8fede..d186a2cb4d0c5fe9f3d5489ded94fffe04b0a71b 100644 (file)
 #define IRRLICHT_API\r
 #endif\r
 \r
-\r
-#ifdef _DEBUG\r
-       //! A few attributes are written in CSceneManager when _IRR_SCENEMANAGER_DEBUG is enabled\r
-       // NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1\r
-       // which is only enabled in debug because it had a large (sometimes >5%) impact on speed.\r
-       // A better solution in the long run is to break the interface and remove _all_ attribute\r
-       // access in functions like CSceneManager::drawAll and instead put that information in some\r
-       // own struct/class or in CSceneManager.\r
-       // See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion.\r
-       #define _IRR_SCENEMANAGER_DEBUG\r
-       #ifdef NO_IRR_SCENEMANAGER_DEBUG\r
-               #undef _IRR_SCENEMANAGER_DEBUG\r
-       #endif\r
-#endif\r
-\r
 #endif // __IRR_COMPILE_CONFIG_H_INCLUDED__\r
index b664c7720a7110c2c350a65bce4d9035da15c911..fd837ccfccb6a077c05f0a00065837e0d35e3101 100644 (file)
@@ -549,17 +549,6 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDE
                break;\r
        }\r
 \r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-       s32 index = Parameters->findAttribute("calls");\r
-       Parameters->setAttribute(index, Parameters->getAttributeAsInt(index)+1);\r
-\r
-       if (!taken)\r
-       {\r
-               index = Parameters->findAttribute("culled");\r
-               Parameters->setAttribute(index, Parameters->getAttributeAsInt(index)+1);\r
-       }\r
-#endif\r
-\r
        return taken;\r
 }\r
 \r
@@ -580,15 +569,6 @@ void CSceneManager::drawAll()
        if (!Driver)\r
                return;\r
 \r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-       // reset attributes\r
-       Parameters->setAttribute("culled", 0);\r
-       Parameters->setAttribute("calls", 0);\r
-       Parameters->setAttribute("drawn_solid", 0);\r
-       Parameters->setAttribute("drawn_transparent", 0);\r
-       Parameters->setAttribute("drawn_transparent_effect", 0);\r
-#endif\r
-\r
        u32 i; // new ISO for scoping problem in some compilers\r
 \r
        // reset all transforms\r
@@ -650,9 +630,6 @@ void CSceneManager::drawAll()
                for (i=0; i<SolidNodeList.size(); ++i)\r
                        SolidNodeList[i].Node->render();\r
 \r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-               Parameters->setAttribute("drawn_solid", (s32) SolidNodeList.size() );\r
-#endif\r
                SolidNodeList.set_used(0);\r
        }\r
 \r
@@ -665,9 +642,6 @@ void CSceneManager::drawAll()
                for (i=0; i<TransparentNodeList.size(); ++i)\r
                        TransparentNodeList[i].Node->render();\r
 \r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-               Parameters->setAttribute ( "drawn_transparent", (s32) TransparentNodeList.size() );\r
-#endif\r
                TransparentNodeList.set_used(0);\r
        }\r
 \r
@@ -680,9 +654,7 @@ void CSceneManager::drawAll()
 \r
                for (i=0; i<TransparentEffectNodeList.size(); ++i)\r
                        TransparentEffectNodeList[i].Node->render();\r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-               Parameters->setAttribute("drawn_transparent_effect", (s32) TransparentEffectNodeList.size());\r
-#endif\r
+\r
                TransparentEffectNodeList.set_used(0);\r
        }\r
 \r
@@ -693,9 +665,7 @@ void CSceneManager::drawAll()
 \r
                for (i=0; i<GuiNodeList.size(); ++i)\r
                        GuiNodeList[i]->render();\r
-#ifdef _IRR_SCENEMANAGER_DEBUG\r
-               Parameters->setAttribute("drawn_gui_nodes", (s32) GuiNodeList.size());\r
-#endif\r
+\r
                GuiNodeList.set_used(0);\r
        }\r
        clearDeletionList();\r