One approach is to create a custom RenderBin. The cull pass collects RenderLeaf objects and puts them into the bin. Each RenderLeaf contains a single Drawable along with its modelview matrix, projection martix, and state graph. You can tweak these properties at draw time, or even draw a leaf multiple times (if you override the right functions in RenderBin).
I use custom RenderBins in a couple places in osgEarth - it's powerful once you get the hang of it :) Glenn Waldron / osgEarth.org / @glennwaldron On Thu, Dec 6, 2012 at 5:31 PM, Aurelien Albert <aurelien.alb...@alyotech.fr > wrote: > Hi, > > I'm intersted by this topic, because in my application, sometimes I need > to render the same scene multiple times. > > For example, I render the scene a first time to generate a regular OpenGL > image. > > Then I render with different shaders/textures to generate an image with > computation results (often using a FBO and RGBA32F render target) > > So, between these different image, the only modified data are the > StateAttribute : shaders, uniforms and textures. > > In this situation, is there anyway to share the "culling results" ? Maybe > anyway to retrieve the RenderGraph and re-excute it ? > > Thank you! > > Cheers, > Aurelien > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51447#51447 > > > > > > _______________________________________________ > 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