Domanda

i am building the wiki Advanced Ogre Framework, then i find that the Ogre::SceneManager::setAmbientLight() does not work at all. i find nothing useful after google, anyone can give me some idea? the code is like this:

m_pSceneMgr = OgreFramework::getSingletonPtr()->m_pRoot->createSceneManager(ST_GENERIC, "GameSceneMgr");
m_pSceneMgr->setAmbientLight(Ogre::ColourValue(0.7f, 0.7f, 0.7f));
È stato utile?

Soluzione

finally i figure it out bymyslef, in the framework, i call setAmbientLight() before these code:

DotSceneLoader* pDotSceneLoader = new DotSceneLoader();
pDotSceneLoader->parseDotScene("CubeScene.xml", "General", m_pSceneMgr, m_pSceneMgr->getRootSceneNode());
delete pDotSceneLoader;

there is a node in the CubeScene.xml set the ambient color again, which is (0,0,0), so my call can not work then.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top