From Lionel Lagarde, "The copy constructor of the nodes and the drawables do :
Node::Node(Node &node, copyop) : _stateSet(copyop(node.getStateSet()), It doesn't call the setStateSet method of osg::Node (or osg::Drawable). So the parent list of the state set is not updated with the new node (drawable)."
This commit is contained in:
@@ -223,7 +223,6 @@ Drawable::Drawable()
|
||||
Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
|
||||
Object(drawable,copyop),
|
||||
_parents(), // leave empty as parentList is managed by Geode
|
||||
_stateset(copyop(drawable._stateset.get())),
|
||||
_initialBound(drawable._initialBound),
|
||||
_computeBoundCallback(drawable._computeBoundCallback),
|
||||
_boundingBox(drawable._boundingBox),
|
||||
@@ -240,6 +239,7 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
|
||||
_cullCallback(drawable._cullCallback),
|
||||
_drawCallback(drawable._drawCallback)
|
||||
{
|
||||
setStateSet(copyop(drawable._stateset.get()));
|
||||
}
|
||||
|
||||
Drawable::~Drawable()
|
||||
|
||||
@@ -82,9 +82,9 @@ Node::Node(const Node& node,const CopyOp& copyop):
|
||||
_numChildrenWithCullingDisabled(0), // assume no children yet.
|
||||
_numChildrenWithOccluderNodes(0),
|
||||
_nodeMask(node._nodeMask),
|
||||
_descriptions(node._descriptions),
|
||||
_stateset(copyop(node._stateset.get()))
|
||||
_descriptions(node._descriptions)
|
||||
{
|
||||
setStateSet(copyop(node._stateset.get()));
|
||||
}
|
||||
|
||||
Node::~Node()
|
||||
|
||||
Reference in New Issue
Block a user