I have basic question about the initialization of ogre variables.
Things like SceneManager, nodes and Lights are always initialized with a raw pointer e.g.:
Code: Select all
Ogre::SceneManager* scnMngr = Ogre::SceneManager* scnMgr = root->createSceneManager();
Ogre::SceneNode* node = scnMngr->getRootSceneNode()->createChildSceneNode();
Code: Select all
Ogre::SceneManager scnMngr = Ogre::SceneManager* scnMgr = root->createSceneManager();
Ogre::SceneNode node = scnMngr->getRootSceneNode()->createChildSceneNode();
This article tells me that raw pointers are one of the last options I should use, so why is it needed in this case? Or what would be the a modern way to initialize the variables?
Article: https://stackoverflow.com/questions/221 ... ect-itself
Thanks for reading and have a nice day
