[osg-users] Reading files and callbacks

Tony Vasile minghia at gmail.com
Mon Aug 31 01:57:55 PDT 2015


So what about the equivalent pre and post callbacks that Performer supports? Is it a case of copying the code in the example 

Code:

class DrawableDrawCallback : public osg::Drawable::DrawCallback
{
        virtual void drawImplementation(osg::RenderInfo& renderInfo,const osg::Drawable* drawable) const
        {
            std::cout<<"draw call back - pre drawImplementation"<<drawable<<std::endl;
            drawable->drawImplementation(renderInfo);
            std::cout<<"draw call back - post drawImplementation"<<drawable<<std::endl;
        }
};

class UpdateCallback : public osg::NodeCallback
{
        virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
        {
            std::cout<<"update callback - pre traverse"<<node<<std::endl;
            traverse(node,nv);
            std::cout<<"update callback - post traverse"<<node<<std::endl;
        }
};




and putting your own calls where the pre and post calls are?

Tony

------------------------
Tony V

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64953#64953








More information about the osg-users mailing list