Moved _stateset = new StateSet instances to setStateSet(new StateSet) to make

sure the wiring up of the StateSet parents is done consistently
This commit is contained in:
Robert Osfield
2008-08-25 10:20:20 +00:00
parent 8d8852bc23
commit ff35465a33
4 changed files with 16 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ LightSource::LightSource():
{
// switch off culling of light source nodes by default.
setCullingActive(false);
_stateset = new StateSet;
setStateSet(new StateSet);
_light = new Light;
}
@@ -52,7 +52,8 @@ void LightSource::setStateSetModes(StateSet& stateset,StateAttribute::GLModeValu
void LightSource::setLocalStateSetModes(StateAttribute::GLModeValue value)
{
if (!_stateset) _stateset = new StateSet;
if (!_stateset) setStateSet(new StateSet);
_stateset->clear();
setStateSetModes(*_stateset,value);
}