diff --git a/apps/opencs/view/render/scenewidget.cpp b/apps/opencs/view/render/scenewidget.cpp index 5a3c14b49..c59c142fc 100644 --- a/apps/opencs/view/render/scenewidget.cpp +++ b/apps/opencs/view/render/scenewidget.cpp @@ -32,11 +32,7 @@ namespace CSVRender mSceneMgr = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC); - // Throw in a random color just to make sure multiple scenes work - Ogre::Real r = Ogre::Math::RangeRandom(0, 1); - Ogre::Real g = Ogre::Math::RangeRandom(0, 1); - Ogre::Real b = Ogre::Math::RangeRandom(0, 1); - mSceneMgr->setAmbientLight(Ogre::ColourValue(r,g,b,1)); + mSceneMgr->setAmbientLight (Ogre::ColourValue (0,0,0,1)); Ogre::Light* l = mSceneMgr->createLight(); l->setType (Ogre::Light::LT_DIRECTIONAL); @@ -57,7 +53,7 @@ namespace CSVRender timer->start (20); /// \todo make this configurable } - void SceneWidget::setAmbient (const Ogre::ColourValue& colour) + void SceneWidget::setDefaultAmbient (const Ogre::ColourValue& colour) { mSceneMgr->setAmbientLight (colour); } diff --git a/apps/opencs/view/render/scenewidget.hpp b/apps/opencs/view/render/scenewidget.hpp index 375c877d2..51d3464ed 100644 --- a/apps/opencs/view/render/scenewidget.hpp +++ b/apps/opencs/view/render/scenewidget.hpp @@ -26,9 +26,6 @@ namespace CSVRender QPaintEngine* paintEngine() const; - void setAmbient (const Ogre::ColourValue& colour); - ///< \note The actual ambient colour may differ based on lighting settings. - protected: void setNavigation (Navigation *navigation); @@ -38,6 +35,9 @@ namespace CSVRender void flagAsModified(); + void setDefaultAmbient (const Ogre::ColourValue& colour); + ///< \note The actual ambient colour may differ based on lighting settings. + private: void paintEvent(QPaintEvent* e); void resizeEvent(QResizeEvent* e); diff --git a/apps/opencs/view/render/unpagedworldspacewidget.cpp b/apps/opencs/view/render/unpagedworldspacewidget.cpp index c7edbe79b..fb74788cc 100644 --- a/apps/opencs/view/render/unpagedworldspacewidget.cpp +++ b/apps/opencs/view/render/unpagedworldspacewidget.cpp @@ -15,7 +15,7 @@ void CSVRender::UnpagedWorldspaceWidget::update() Ogre::ColourValue colour; colour.setAsABGR (record.get().mAmbi.mAmbient); - setAmbient (colour); + setDefaultAmbient (colour); /// \todo deal with mSunlight and mFog/mForDensity }