aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornumzero <numzer0@yandex.ru>2023-02-22 20:13:55 +0300
committernumzero <numzer0@yandex.ru>2023-02-22 21:11:12 +0300
commita0e1e39ea784aa8d17ba9092a950d5ad85a51189 (patch)
treef744823ca40cfdd9846499c3544c7ee4bf74535f
parentd8e09f14bd4a279ded0845196f677fabe7947079 (diff)
downloadirrlicht-a0e1e39ea784aa8d17ba9092a950d5ad85a51189.tar.xz
Drop _IRR_SCENEMANAGER_DEBUG
-rw-r--r--include/IrrCompileConfig.h15
-rw-r--r--source/Irrlicht/CSceneManager.cpp34
2 files changed, 2 insertions, 47 deletions
diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h
index 0259399..d186a2c 100644
--- a/include/IrrCompileConfig.h
+++ b/include/IrrCompileConfig.h
@@ -34,19 +34,4 @@
#define IRRLICHT_API
#endif
-
-#ifdef _DEBUG
- //! A few attributes are written in CSceneManager when _IRR_SCENEMANAGER_DEBUG is enabled
- // NOTE: Those attributes were used always until 1.8.0 and became a global define for 1.8.1
- // which is only enabled in debug because it had a large (sometimes >5%) impact on speed.
- // A better solution in the long run is to break the interface and remove _all_ attribute
- // access in functions like CSceneManager::drawAll and instead put that information in some
- // own struct/class or in CSceneManager.
- // See http://irrlicht.sourceforge.net/forum/viewtopic.php?f=2&t=48211 for the discussion.
- #define _IRR_SCENEMANAGER_DEBUG
- #ifdef NO_IRR_SCENEMANAGER_DEBUG
- #undef _IRR_SCENEMANAGER_DEBUG
- #endif
-#endif
-
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
diff --git a/source/Irrlicht/CSceneManager.cpp b/source/Irrlicht/CSceneManager.cpp
index b664c77..fd837cc 100644
--- a/source/Irrlicht/CSceneManager.cpp
+++ b/source/Irrlicht/CSceneManager.cpp
@@ -549,17 +549,6 @@ u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDE
break;
}
-#ifdef _IRR_SCENEMANAGER_DEBUG
- s32 index = Parameters->findAttribute("calls");
- Parameters->setAttribute(index, Parameters->getAttributeAsInt(index)+1);
-
- if (!taken)
- {
- index = Parameters->findAttribute("culled");
- Parameters->setAttribute(index, Parameters->getAttributeAsInt(index)+1);
- }
-#endif
-
return taken;
}
@@ -580,15 +569,6 @@ void CSceneManager::drawAll()
if (!Driver)
return;
-#ifdef _IRR_SCENEMANAGER_DEBUG
- // reset attributes
- Parameters->setAttribute("culled", 0);
- Parameters->setAttribute("calls", 0);
- Parameters->setAttribute("drawn_solid", 0);
- Parameters->setAttribute("drawn_transparent", 0);
- Parameters->setAttribute("drawn_transparent_effect", 0);
-#endif
-
u32 i; // new ISO for scoping problem in some compilers
// reset all transforms
@@ -650,9 +630,6 @@ void CSceneManager::drawAll()
for (i=0; i<SolidNodeList.size(); ++i)
SolidNodeList[i].Node->render();
-#ifdef _IRR_SCENEMANAGER_DEBUG
- Parameters->setAttribute("drawn_solid", (s32) SolidNodeList.size() );
-#endif
SolidNodeList.set_used(0);
}
@@ -665,9 +642,6 @@ void CSceneManager::drawAll()
for (i=0; i<TransparentNodeList.size(); ++i)
TransparentNodeList[i].Node->render();
-#ifdef _IRR_SCENEMANAGER_DEBUG
- Parameters->setAttribute ( "drawn_transparent", (s32) TransparentNodeList.size() );
-#endif
TransparentNodeList.set_used(0);
}
@@ -680,9 +654,7 @@ void CSceneManager::drawAll()
for (i=0; i<TransparentEffectNodeList.size(); ++i)
TransparentEffectNodeList[i].Node->render();
-#ifdef _IRR_SCENEMANAGER_DEBUG
- Parameters->setAttribute("drawn_transparent_effect", (s32) TransparentEffectNodeList.size());
-#endif
+
TransparentEffectNodeList.set_used(0);
}
@@ -693,9 +665,7 @@ void CSceneManager::drawAll()
for (i=0; i<GuiNodeList.size(); ++i)
GuiNodeList[i]->render();
-#ifdef _IRR_SCENEMANAGER_DEBUG
- Parameters->setAttribute("drawn_gui_nodes", (s32) GuiNodeList.size());
-#endif
+
GuiNodeList.set_used(0);
}
clearDeletionList();