OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

List render bins


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
krikr42
Newbie


Joined: 03 May 2018
Posts: 8

PostPosted: Mon May 21, 2018 7:01 am    Post subject:
List render bins
Reply with quote

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)?

Thank you!

Cheers,
Kristofer
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12095

PostPosted: Mon May 21, 2018 7:17 am    Post subject:
List renderbins
Reply with quote

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 <> wrote:
Quote:
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








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
krikr42
Newbie


Joined: 03 May 2018
Posts: 8

PostPosted: Mon May 21, 2018 9:54 am    Post subject:
Reply with quote

Hi,

I'm trying to gain a greater understanding of render bins, and I was thinking both, basically. I.e. both what render bins OSG created when the application started, and what render bins are created by the application itself (i.e. not by OSG). This snippet of code was helpful, though, thanks.

I didn't expect there to be a method specifically for listing all render bins, but I imagine there must be some container or something they are stored in, and I wanted to loop through all elements in this container and print information about them.

Cheers,
Kristofer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osgOcean - Render to Texture Camera rob_ewbank osgOcean [osgOcean] 3 Wed Jul 04, 2018 11:27 am View latest post
No new posts render to a texure bound to an FBO an... Julius Ziegler General 4 Tue Apr 10, 2018 6:49 pm View latest post
No new posts Creating depth texture in pre render ... wernerM General 0 Fri Mar 16, 2018 2:31 pm View latest post
No new posts Problem blending multiple render passes antiro42 General 5 Sat Sep 09, 2017 9:44 am View latest post
No new posts Select StateSet subset to render basi... chunyanggou General 0 Wed Jul 26, 2017 9:17 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP