Made the local storage of a StateAttribute* be a ref_ptr<>

This commit is contained in:
Robert Osfield
2004-07-08 22:11:42 +00:00
parent e81d3ea000
commit 8a44435e4d
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object
virtual void reset();
typedef std::pair< const osg::StateAttribute*, osg::ref_ptr<osg::RefMatrix> > AttrMatrixPair;
typedef std::pair< osg::ref_ptr<const osg::StateAttribute> , osg::ref_ptr<osg::RefMatrix> > AttrMatrixPair;
typedef std::vector< AttrMatrixPair > AttrMatrixList;
typedef std::map< unsigned int, AttrMatrixList > TexUnitAttrMatrixListMap;

View File

@@ -52,7 +52,7 @@ void RenderStageLighting::draw(osg::State& state,RenderLeaf*& previous)
litr->first->apply(state);
// tell state about.
state.haveAppliedAttribute(litr->first);
state.haveAppliedAttribute(litr->first.get());
}
@@ -74,7 +74,7 @@ void RenderStageLighting::draw(osg::State& state,RenderLeaf*& previous)
litr->first->apply(state);
// tell state about.
state.haveAppliedTextureAttribute(titr->first, litr->first);
state.haveAppliedTextureAttribute(titr->first, litr->first.get());
}