|
|
|
@ -99,7 +99,7 @@ namespace MWRender
|
|
|
|
|
|
|
|
|
|
osg::ref_ptr<SceneUtil::LightManager> lightManager = new SceneUtil::LightManager;
|
|
|
|
|
lightManager->setStartLight(1);
|
|
|
|
|
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
|
|
|
|
|
osg::ref_ptr<osg::StateSet> stateset = lightManager->getOrCreateStateSet();
|
|
|
|
|
stateset->setMode(GL_LIGHTING, osg::StateAttribute::ON);
|
|
|
|
|
stateset->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
|
|
|
|
|
stateset->setMode(GL_CULL_FACE, osg::StateAttribute::ON);
|
|
|
|
@ -130,7 +130,6 @@ namespace MWRender
|
|
|
|
|
|
|
|
|
|
lightSource->setStateSetModes(*stateset, osg::StateAttribute::ON);
|
|
|
|
|
|
|
|
|
|
lightManager->setStateSet(stateset);
|
|
|
|
|
lightManager->addChild(lightSource);
|
|
|
|
|
|
|
|
|
|
mCamera->addChild(lightManager);
|
|
|
|
|