My Question is 'What's the differences between two methods of adding new custom scene node as follow'?
[One]
I've added some custom scene nodes on irrlicht, and just 'CxxxSceneNode.cpp and CxxxSceneNode.h'.
It's OK.
[Two]
But, i found some files also related scene node.
'ISceneManager.h'---- can found many addxxxSceneNode()
'CDefaultSceneNodeFactory.cpp'----
case ESNT_xxx:
return Manager->addxxxSceneNode(10, parent);
case ....
'CSceneManager.cpp'---- addxxxSceneNode()
'CSceneManager.h'---- addxxxSceneNode()
'ESceneNodeType.h'----
enum ESCENE_NODE_TYPE
{
//! simple cube scene node
ESNT_CUBE = MAKE_IRR_ID('c','u','b','e'),
......
Adding Custom Scene Node Problem
-
qidaozhilong2
- Posts: 17
- Joined: Sun Apr 01, 2012 3:51 pm
Re: Adding Custom Scene Node Problem
Changes these files [Two] mentioned will increase performance or other advantages?
Re: Adding Custom Scene Node Problem
I don't know if you get some performance increase by modifying the scene manager (would imho not be so big anyways, as these changes are only relevant when scene nodes are added), but the "standard" way of adding new scene nodes to the scene manager is to write your own scene node factory and register it to the scene manager (before loading a scene), I never had any bad experience doing it that way (neither in performance nor anything else).
