diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-09-04 00:48:47 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-09-04 00:48:47 +0400 |
commit | 1f8291f78d6eb3e02414cc7801fe5ba9ad524e4b (patch) | |
tree | 8d038bfb9129ae4c2d708f0abfd6c7644000dc4c /source/gameengine/Ketsji/KX_Scene.h | |
parent | 8295480bbeee2aafa0ea70d19836b3ab094ee08e (diff) |
BGE animations: Adding a separate list to KX_Scene for animated objects. This makes scenes with a lot of non-animated objects faster. In my test scene with 8000 static, non-animated cubes my time spent on animations went from 1.5~1.7ms to 0.001ms.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index da9cc12c76a..499861bce50 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -130,6 +130,7 @@ protected: CListValue* m_parentlist; // all 'root' parents CListValue* m_lightlist; CListValue* m_inactivelist; // all objects that are not in the active layer + CListValue* m_animatedlist; // all animated objects SG_QList m_sghead; // list of nodes that needs scenegraph update // the Dlist is not object that must be updated @@ -334,6 +335,10 @@ public: int NewRemoveObject(CValue* gameobj); void ReplaceMesh(CValue* gameobj, void* meshob, bool use_gfx, bool use_phys); + + void AddAnimatedObject(CValue* gameobj); + void RemoveAnimatedObject(CValue* gameobj); + /** * @section Logic stuff * Initiate an update of the logic system. |