From 25e0ab0b824c7a2254b9815976b4998174632058 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Sun, 1 Apr 2012 23:37:47 +0200 Subject: [PATCH] Enable light source for transparent surfaces --- src/Main/renderer.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); -- 2.39.5