diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 237435c97..f3dd310c5 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -121,7 +121,9 @@ public: stateSet->setMode(GL_FOG, osg::StateAttribute::OFF); stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); } - virtual void drawImplementation(osg::State& state) const + virtual void drawImplementation(osg::RenderInfo& renderInfo) const + { drawImplementation(*renderInfo.getState()); } + void drawImplementation(osg::State& state) const { state.pushStateSet(getStateSet()); state.apply(); @@ -184,7 +186,9 @@ public: stateSet->setTextureAttribute(0, new osg::TexEnv(osg::TexEnv::MODULATE)); } - virtual void drawImplementation(osg::State& state) const + virtual void drawImplementation(osg::RenderInfo& renderInfo) const + { drawImplementation(*renderInfo.getState()); } + void drawImplementation(osg::State& state) const { state.pushStateSet(getStateSet()); state.apply(); diff --git a/src/Model/panelnode.hxx b/src/Model/panelnode.hxx index 0745e5d24..9a5bf938a 100644 --- a/src/Model/panelnode.hxx +++ b/src/Model/panelnode.hxx @@ -33,7 +33,9 @@ public: FGPanel* getPanel() { return _panel; } - virtual void drawImplementation(osg::State& state) const; + virtual void drawImplementation(osg::RenderInfo& renderInfo) const + { drawImplementation(*renderInfo.getState()); } + void drawImplementation(osg::State& state) const; virtual osg::BoundingBox computeBound() const; private: