Removed deprecated drawImplementation(State&) method from Drawable and Drawable::DrawCallback
This commit is contained in:
@@ -39,10 +39,10 @@ class CullCallback : public osg::NodeCallback
|
||||
|
||||
class DrawableDrawCallback : public osg::Drawable::DrawCallback
|
||||
{
|
||||
virtual void drawImplementation(osg::State& state,const osg::Drawable* drawable) const
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const
|
||||
{
|
||||
std::cout<<"draw call back - pre drawImplementation"<<drawable<<std::endl;
|
||||
drawable->drawImplementation(state);
|
||||
drawable->drawImplementation(renderInfo);
|
||||
std::cout<<"draw call back - post drawImplementation"<<drawable<<std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void loadFont(const std::string& font);
|
||||
void loadLayout(const std::string& layout);
|
||||
|
||||
void drawImplementation(osg::State& state) const;
|
||||
void drawImplementation(osg::RenderInfo& renderInfo) const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -185,8 +185,10 @@ void CEGUIDrawable::loadLayout(const std::string& layout)
|
||||
|
||||
}
|
||||
|
||||
void CEGUIDrawable::drawImplementation(osg::State& state) const
|
||||
void CEGUIDrawable::drawImplementation(osg::RenderInfo& renderInfo) const
|
||||
{
|
||||
osg::State& state = renderInfo.getState();
|
||||
|
||||
if (state.getContextID()!=_activeContextID) return;
|
||||
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
|
||||
@@ -25,8 +25,9 @@ struct DrawCallback : public osg::Drawable::DrawCallback
|
||||
DrawCallback():
|
||||
_firstTime(true) {}
|
||||
|
||||
virtual void drawImplementation(osg::State& state,const osg::Drawable* drawable) const
|
||||
virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const
|
||||
{
|
||||
osg::State& state = *renderInfo.getState();
|
||||
|
||||
if (!_firstTime)
|
||||
{
|
||||
@@ -50,7 +51,7 @@ struct DrawCallback : public osg::Drawable::DrawCallback
|
||||
|
||||
_firstTime = false;
|
||||
|
||||
drawable->drawImplementation(state);
|
||||
drawable->drawImplementation(renderInfo);
|
||||
}
|
||||
|
||||
mutable bool _firstTime;
|
||||
|
||||
@@ -215,7 +215,7 @@ class Teapot : public osg::Drawable
|
||||
|
||||
// the draw immediate mode method is where the OSG wraps up the drawing of
|
||||
// of OpenGL primitives.
|
||||
virtual void drawImplementation(osg::State&) const
|
||||
virtual void drawImplementation(osg::RenderInfo&) const
|
||||
{
|
||||
// teapot(..) doens't use vertex arrays at all so we don't need to toggle their state
|
||||
// if we did we'd need to something like following call
|
||||
|
||||
Reference in New Issue
Block a user