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