Changed the LightSource::setReferenceFrame() read code so that it doesn't
enable the culling active flag if its was already set to false.
This commit is contained in:
parent
b5f1d50377
commit
9b7678138f
@ -29,6 +29,8 @@ bool LightSource_readLocalData(Object& obj, Input& fr)
|
||||
|
||||
if (fr[0].matchWord("referenceFrame"))
|
||||
{
|
||||
bool cullingActiveBefore = lightsource.getCullingActive();
|
||||
|
||||
if (fr[1].matchWord("RELATIVE_TO_ABSOLUTE") || fr[1].matchWord("ABSOLUTE"))
|
||||
{
|
||||
lightsource.setReferenceFrame(LightSource::ABSOLUTE_RF);
|
||||
@ -41,6 +43,12 @@ bool LightSource_readLocalData(Object& obj, Input& fr)
|
||||
fr += 2;
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
// if culling wasn't before reset it to off.
|
||||
if (!cullingActiveBefore && lightsource.getCullingActive())
|
||||
{
|
||||
lightsource.setCullingActive(cullingActiveBefore);
|
||||
}
|
||||
}
|
||||
|
||||
osg::ref_ptr<StateAttribute> sa=fr.readStateAttribute();
|
||||
|
Loading…
Reference in New Issue
Block a user