class DrawableDrawCallback : public osg::Drawable::DrawCallback
{
virtual voiddrawImplementation(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;
}
};
struct DrawableUpdateCallback :public osg::Drawable::UpdateCallback
{
virtual voidupdate(osg::NodeVisitor*, osg::Drawable* drawable)
{
std::cout<<"Drawable update callback "<<drawable<<std::endl;
}
};
struct DrawableCullCallback : public osg::Drawable::CullCallback
{
/** do customized cull code.*/
virtual boolcull(osg::NodeVisitor*, osg::Drawable* drawable, osg::State*/*state*/) const
{
std::cout<<"Drawable cull callback "<<drawable<<std::endl;
return false;
}
};