Re: [osg-users] set render bin details
The render bin # is just an integer, so you can use INT_MAX. Glenn Waldron / @glennwaldron On Wed, May 1, 2013 at 10:13 PM, Patrick Keenan wrote: > Hi, > > If using > > Code: > > ObjStateSet->setRenderBinDetails(-1, "RenderBin"); > > > > causes that thing to be rendered first is there some trick to cause the > thing to be drawn last? Right now I'm using > > Code: > > HUDStateSet->setRenderBinDetails(1000, "RenderBin"); > > > > to render my Heads Up Display last but I guess if I rendered over 1000 > things this could fail. Is there something like > > Code: > > HUDStateSet->setRenderBinDetails(BIN_MAX, "RenderBin"); > > > > ? > > Thanks, > Patrick > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=53881#53881 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] set render bin details
Hi, If using Code: ObjStateSet->setRenderBinDetails(-1, "RenderBin"); causes that thing to be rendered first is there some trick to cause the thing to be drawn last? Right now I'm using Code: HUDStateSet->setRenderBinDetails(1000, "RenderBin"); to render my Heads Up Display last but I guess if I rendered over 1000 things this could fail. Is there something like Code: HUDStateSet->setRenderBinDetails(BIN_MAX, "RenderBin"); ? Thanks, Patrick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53881#53881 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] set render bin details
On 02/16/2012 08:22 AM, Sajjadul Islam wrote: Hi, I am going through an osg example and one point there is a statement as follows: Code: stateset->setRenderBinDetails(-1,"RenderBin"); When OSG traverses a scene for rendering, it organizes geometry into separate render bins. Each bin has an index and a sorting mode. When it comes time to actually draw the geometry, the render bins are traversed in order of index (lowest to highest), and the geometry in those bins are drawn after being sorted according to the sorting mode. In this case the index of -1 means that the geometry in this bin will be drawn before the rest of the geometry (which by default goes into bin 0). "RenderBin" is the default sort order (which happens to be SORT_BY_STATE). In this case, there must be some geometry that is required to be rendered before the rest of the scene. Since you didn't mention which osg example you were looking at, that's all I can say about it. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] set render bin details
Hi, I am going through an osg example and one point there is a statement as follows: Code: stateset->setRenderBinDetails(-1,"RenderBin"); Commenting the above statement did not make any changes to the scene. Any explanation when one should call this function ? Thank you! Cheers, Sajjadul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45507#45507 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org