lukeneorm
06-09-2009 10:47:15
Hi,
In my application I need to temporarily disable Caelum system and the sun/moon directional lights when the user want to focus attention on one single object in the scene.
I setup Caelum in the startup in this way:
And the only way to temporarily disable Caelum I found is this:
..it works for me, but.. am I following the right way? Is there a better way to temporarily disable Caelum system and release Caelum resources so as to obtain more FPS?
Thank you!
In my application I need to temporarily disable Caelum system and the sun/moon directional lights when the user want to focus attention on one single object in the scene.
I setup Caelum in the startup in this way:
myCaelumSystem = new Caelum::CaelumSystem (myRoot, mSceneMgr, Caelum::CaelumSystem::CaelumComponent::CAELUM_COMPONENTS_DEFAULT);
myCaelumSystem->setManageSceneFog(false);
myCaelumSystem->setCloudSystem(NULL);
myCaelumSystem->setDepthComposer(NULL);
myCaelumSystem->setManageAmbientLight(true);
myCaelumSystem->setEnsureSingleLightSource(true);
myCaelumSystem->setEnsureSingleShadowSource(true);
mWindow->addListener(myCaelumSystem);
mRoot->addFrameListener(myCaelumSystem);
And the only way to temporarily disable Caelum I found is this:
myCaelumSystem->setEnsureSingleLightSource(false);
myCaelumSystem->setEnsureSingleShadowSource(false);
myCaelumSystem->getSun()->setForceDisable(true);
myCaelumSystem->getMoon()->setForceDisable(true);
..it works for me, but.. am I following the right way? Is there a better way to temporarily disable Caelum system and release Caelum resources so as to obtain more FPS?
Thank you!