On Thu, Jul 24, 2008 at 3:08 PM, Viggo Løvli <[EMAIL PROTECTED]> 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@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org