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()); }