-----------------------------------------------------------------------------------
| 891 | void GraphicsSystem::initMiscParamsListener( Ogre::NameValuePairList ¶ms ) {} |
| 892 | //----------------------------------------------------------------------------------- |
| 893 | void GraphicsSystem::createAtmosphere( Ogre::Light *sunLight ) |
| 894 | { |
| 895 | #ifdef OGRE_BUILD_COMPONENT_ATMOSPHERE |
| 896 | { |
| 897 | Ogre::AtmosphereComponent *atmosphere = mSceneManager->getAtmosphereRaw(); |
| 898 | OGRE_DELETE atmosphere; |
| 899 | } |
| 900 | |
| 901 | Ogre::AtmosphereNpr *atmosphere = |
| 902 | OGRE_NEW Ogre::AtmosphereNpr( mRoot->getRenderSystem()->getVaoManager() ); |
| 903 | |
| 904 | { |
| 905 | // Preserve the Power Scale explicitly set by the sample |
| 906 | Ogre::AtmosphereNpr::Preset preset = atmosphere->getPreset(); |
| 907 | preset.linkedLightPower = sunLight->getPowerScale(); |
| 908 | atmosphere->setPreset( preset ); |
| 909 | } |
| 910 | |
| 911 | atmosphere->setSunDir( |
| 912 | sunLight->getDirection(), |
| 913 | std::asin( Ogre::Math::Clamp( -sunLight->getDirection().y, -1.0f, 1.0f ) ) / |
| 914 | Ogre::Math::PI ); |
| 915 | atmosphere->setLight( sunLight ); |
| 916 | atmosphere->setSky( mSceneManager, true ); |
| 917 | #endif |
| 918 | } |
| 919 | //----------------------------------------------------------------------------------- |
| 920 | void GraphicsSystem::setAlwaysAskForConfig( bool alwaysAskForConfig ) |
| 921 | { |
no test coverage detected