From: Frederic Bouvier Date: Sun, 1 Apr 2012 21:37:47 +0000 (+0200) Subject: Enable light source for transparent surfaces X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=25e0ab0b824c7a2254b9815976b4998174632058;p=flightgear.git Enable light source for transparent surfaces --- diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index d9ccad3d4..67e2d6e39 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -1457,8 +1457,7 @@ FGRenderer::setupView( void ) lightSource->setReferenceFrame(osg::LightSource::RELATIVE_RF); lightSource->setLocalStateSetModes(osg::StateAttribute::ON); lightSource->setUpdateCallback(new FGLightSourceUpdateCallback); - if ( _classicalRenderer ) - mRealRoot->addChild(lightSource); + mRealRoot->addChild(lightSource); // we need a white diffuse light for the phase of the moon osg::LightSource* sunLight = new osg::LightSource; sunLight->getLight()->setDataVariance(Object::DYNAMIC); @@ -1475,8 +1474,7 @@ FGRenderer::setupView( void ) skyGroup->addChild(_sky->getPreRoot()); sunLight->addChild(skyGroup); mRoot->addChild(sceneGroup); - if ( _classicalRenderer ) - mRoot->addChild(sunLight); + mRoot->addChild(sunLight); // Clouds are added to the scene graph later stateSet = globals->get_scenery()->get_scene_graph()->getOrCreateStateSet();