Changeset 9897

Show
Ignore:
Timestamp:
03/11/09 12:00:24 (5 years ago)
Author:
robert
Message:

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)."

Location:
OpenSceneGraph/trunk/src/osg
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/Drawable.cpp

    r9023 r9897  
    224224    Object(drawable,copyop), 
    225225    _parents(), // leave empty as parentList is managed by Geode 
    226     _stateset(copyop(drawable._stateset.get())), 
    227226    _initialBound(drawable._initialBound), 
    228227    _computeBoundCallback(drawable._computeBoundCallback), 
     
    241240    _drawCallback(drawable._drawCallback) 
    242241{ 
     242    setStateSet(copyop(drawable._stateset.get())); 
    243243} 
    244244 
  • OpenSceneGraph/trunk/src/osg/Node.cpp

    r9023 r9897  
    8383        _numChildrenWithOccluderNodes(0), 
    8484        _nodeMask(node._nodeMask),  
    85         _descriptions(node._descriptions), 
    86         _stateset(copyop(node._stateset.get())) 
    87 { 
     85        _descriptions(node._descriptions) 
     86{ 
     87    setStateSet(copyop(node._stateset.get())); 
    8888} 
    8989