Change the light in LightSource from a generic osg::StateAttribute to

a osg::Light.
This commit is contained in:
Robert Osfield
2004-07-02 14:46:24 +00:00
parent 4ba3f7cad3
commit 2ce192f0ae
3 changed files with 12 additions and 15 deletions

View File

@@ -40,7 +40,8 @@ bool LightSource_readLocalData(Object& obj, Input& fr)
}
}
StateAttribute* light=fr.readStateAttribute();
osg::ref_ptr<StateAttribute> sa=fr.readStateAttribute();
osg::Light* light = dynamic_cast<Light*>(sa.get());
if (light)
{
lightsource.setLight(light);