[osg-users] Robert: I figured it out :-) (was: Is it possible to know when the node-graph is 'dirty'?)

Viggo Løvli vigigio at hotmail.com
Thu Jul 24 23:22:26 PDT 2008

Hi Robert,
My current code instances a new one each cull traverse. I wonder if that means I get a sizeof(osgUtil::RenderBin) memory leak each cull-traverse?
Anyway, I am going to try to multi-buffer it. 
I should be able to count the number of cull-traverse calls I get for each update tranverse. That (I guess) should tell me automatically how many instances of osgUtil::RenderBin that I would need. I will multiply it by two for double buffering and then it should work like a dream.
> Date: Thu, 24 Jul 2008 17:53:57 +0100> From: robert.osfield at gmail.com> To: osg-users at lists.openscenegraph.org> Subject: Re: [osg-users] Robert: I figured it out :-) (was: Is it possible to know when the node-graph is 'dirty'?)> > On Thu, Jul 24, 2008 at 3:08 PM, Viggo Løvli <vigigio at hotmail.com> wrote:> > The only thing that annoy me now is the call to new().> > Creating one bin as a member variable in my class and using it instead of> > the call to new cause the system to crash. Double buffering I guess.> > So maybe I can fix this by having two RenderBin instances in my class, and> > use them every other call?> >> > But, I suspect that it may not be enough? Would I need two per cull call> > that is ran per frame? Say that I in the future render with 4 different> > cameras and cull the world 4 times. Would I then need 4*2 bin instances to> > use instead of calling new()?> > The OSG's rendering backend is both very dynamic (created on demand on> each frame) and flexible (it can be a huge range of bin> configurations, potentially different on each frame) and the threading> and multiple graphics context rendering are all thrown into this mix.> This makes reuse of data something you have to be very careful about,> in your case you'd either need to create on each new frame or> multi-buffer.> > Robert.> _______________________________________________> osg-users mailing list> osg-users at lists.openscenegraph.org> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Windows Live Messenger - også på mobilen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080725/2aa89dce/attachment-0003.htm>

More information about the osg-users mailing list