From 8a44435e4d34d942349c39fd42632b3570d37ba9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 8 Jul 2004 22:11:42 +0000 Subject: [PATCH] Made the local storage of a StateAttribute* be a ref_ptr<> --- include/osgUtil/RenderStageLighting | 2 +- src/osgUtil/RenderStageLighting.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/osgUtil/RenderStageLighting b/include/osgUtil/RenderStageLighting index d02351895..5fb608054 100644 --- a/include/osgUtil/RenderStageLighting +++ b/include/osgUtil/RenderStageLighting @@ -40,7 +40,7 @@ class OSGUTIL_EXPORT RenderStageLighting : public osg::Object virtual void reset(); - typedef std::pair< const osg::StateAttribute*, osg::ref_ptr > AttrMatrixPair; + typedef std::pair< osg::ref_ptr , osg::ref_ptr > AttrMatrixPair; typedef std::vector< AttrMatrixPair > AttrMatrixList; typedef std::map< unsigned int, AttrMatrixList > TexUnitAttrMatrixListMap; diff --git a/src/osgUtil/RenderStageLighting.cpp b/src/osgUtil/RenderStageLighting.cpp index c9b585759..5e1b0bb7e 100644 --- a/src/osgUtil/RenderStageLighting.cpp +++ b/src/osgUtil/RenderStageLighting.cpp @@ -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()); }