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

@@ -22,7 +22,7 @@ TexGenNode::TexGenNode():
_textureUnit = 0;
_value = StateAttribute::ON;
_stateset = new StateSet;
setStateSet(new StateSet);
_texgen = new TexGen;
}
@@ -33,6 +33,7 @@ TexGenNode::TexGenNode(const TexGenNode& cn, const CopyOp& copyop):
_texgen(static_cast<TexGen*>(copyop(cn._texgen.get()))),
_referenceFrame(cn._referenceFrame)
{
setStateSet(new StateSet);
}
TexGenNode::TexGenNode(TexGen *texgen):
@@ -43,7 +44,7 @@ TexGenNode::TexGenNode(TexGen *texgen):
_textureUnit = 0;
_value = StateAttribute::ON;
_stateset = new StateSet;
setStateSet(new StateSet);
_texgen = texgen;
}