[osg-users] List renderbins

Robert Osfield robert.osfield at gmail.com
Mon May 21 00:16:03 PDT 2018


Hi Kristofer,

Are you asking what RenderBin implementations are available to be in
the OSG itself, or what RenderBin's have been created by your
application at runtime?

The list of ones that are available by default is set up by
OpenSceneGraph/src/osgUtil/RenderBin.cpp, at the top of the .cpp is
the list of one that are provided by default (you can define your own
if you want.)  The code that sets them up is:

class RenderBinPrototypeList : osg::depends_on<OpenThreads::Mutex*,
osg::Referenced::getGlobalReferencedMutex>,
                               public osg::Referenced, public
std::map< std::string, osg::ref_ptr<RenderBin> >
{
    public:
        RenderBinPrototypeList()
        {
            add("RenderBin",new
RenderBin(RenderBin::getDefaultRenderBinSortMode()));
            add("StateSortedBin",new RenderBin(RenderBin::SORT_BY_STATE));
            add("DepthSortedBin",new RenderBin(RenderBin::SORT_BACK_TO_FRONT));
            add("SORT_BACK_TO_FRONT",new
RenderBin(RenderBin::SORT_BACK_TO_FRONT));
            add("SORT_FRONT_TO_BACK",new
RenderBin(RenderBin::SORT_FRONT_TO_BACK));
            add("TraversalOrderBin",new RenderBin(RenderBin::TRAVERSAL_ORDER));
        }

        void add(const std::string& name, RenderBin* bin)
        {
            (*this)[name] = bin;
        }

        ~RenderBinPrototypeList() {}
};


There isn't a method for listing this, I've never added as no one has
ever asked...

Robert.

On 21 May 2018 at 08:01, Kristofer Krus <kristofer.krus at liu.se> wrote:
> Hi,
>
> Is there some way in which I can list all existing render bins and print details about them, i.e. number, name and mode (the details given to setRenderBinDetails (http://public.vrac.iastate.edu/vancegroup/docs/OpenSceneGraphReferenceDocs-3.0/a00762.html#a498095c3811e00b2fc6123a24ef5ec81))?
>
> Thank you!
>
> Cheers,
> Kristofer
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73683#73683
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list