Hi Joakim.

On Mon, Feb 23, 2009 at 4:54 PM, Joakim Simonsson <joa...@autosim.no> wrote:
> Thanks for your advice!
>
> I looked in the osgViwer::Renderer code. And it seems that the entire
> sceneview is compiled in osgViewer::Renderer::compile().
>
> In my scenario, I first load a huge database. Then during the simulation, I
> load smaller objects and add them to my existing scene graph.
>
> I was just wondering if it is an overkill to compile the entire sceneview
> for each smaller object that I load during runtime. Wouldn't it be enough to
> only compile my added objects, before I add them to my existing scene graph?

Yes a complete recompile traversal will be done, but if objects are
already compiled they won't be compiled again.

If you do want to just compile you new elements then you could a a
custom GraphicsOperation to the GraphicsContext's GraphicsThread.
Another alternative would be to use a CompileContext to allow you to
compile the new subgraph asynchronously.  Finally you could look at
use the DatabasePager to load and precompile you data.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to