Hi Aurelien, Might there be another way? Modify the core OSG just for the benefit of the one user isn't an ideal way to go.
At what point do you need to determine the View? The RenderInfo object passed in when rendering has the current Camera and View. Might this be sufficient? Robert. Robert. On 25 June 2013 17:00, Aurelien Albert <[email protected]> wrote: > Hi, > > I'm facing a problem : I use custom RenderBins for custom rendering, but it > would be *very* convenient to be able to identity which "view" use this > RenderBin instance. > > I've tought about this modification on RenderBin::createRenderBin : > > > Code: > RenderBin* RenderBin::createRenderBin(const std::string& binName[b], > osgUtil::CullVisitor* pCullVisitor=NULL[/b]) > { > RenderBinPrototypeList* list = renderBinPrototypeList(); > if (list) > { > RenderBin* prototype = getRenderBinPrototype(binName); > if (prototype) > { > RenderBin* pResult = > dynamic_cast<RenderBin*>(prototype->clone(osg::CopyOp::DEEP_COPY_ALL)) > if (pResult != NULL) > { > pResult->setCullVisitor(pCullVisitor); > return resultt; > } > } > } > > OSG_WARN <<"Warning: RenderBin \""<<binName<<"\" implementation not > found, using default RenderBin as a fallback."<<std::endl; > return new RenderBin; > } > > > > > This should not modify any existing code (pCullVisitor has a NULL default > value) and allow to store the CullVisitor instance (which is a good way to > identify a "view" I think) > > Any thought about this ? > > Thank you! > > Cheers, > Aurelien > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=54891#54891 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

