Hi Ricky, The cull performance will be very slightly higher for method 2 as the cull traversal will have to push/pop more state, but the draw traversal will be identical between the two. There will be so little difference in measurable performance I would suggest going for what makes most sense for your application.
Of course one should test this... it'd be easy to benchmark the two configuration to make sure that there isn't a measurable difference. Robert. On Thu, Jul 1, 2010 at 3:57 PM, Riccardo Corsi <[email protected]> wrote: > Hi All, > > in my scene I have many drawables that share the same settings/glsl > program - the needed params to render the different drawables are > already passed in as vertex attributes at geometry level. > I'd like to know it there's any difference, with respect to > performances, if I share the common StateSet either one of the > following methods: > > 1. share the common SS in a single geode > > geode1 - SS1 > | > |-------------------------------- > | | | > draw1 draw2 draw3 > > > geode1 - SS2 > | > |-------------------------------- > | | | > draw11 draw12 draw13 > > > > 2. share the same instance of the SS (let's call them SS1 and SS2) at > drawable level: > > geode > | > |---------------------------------------------------------------------------------------------------------------------- > | | | > | | | > draw1--SS1 draw2--SS1 draw3--SS1 draw11--SS2 > draw12--SS2 draw13--SS2 > > > The second method would be preferable to me, as every drawable > represents an independent object, and I might need to change the way > it's rendered at runtime (see hilight, etc...). > I'd like to know if there are some performance penalties with respect > to method 1. > > Thanks a lot. > Ricky > _______________________________________________ > 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

