[osg-users] Robert: I figured it out :-) (was: Is it possible to know when the node-graph is 'dirty'?)
robert.osfield at gmail.com
Thu Jul 24 09:53:57 PDT 2008
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
More information about the osg-users