[osg-users] How to modify the scenegraph after viewer runs

Adrian Egli OpenSceneGraph (3D) 3dhelp at gmail.com
Mon Jan 28 02:28:21 PST 2008


2008/1/28, Ronald Pan <ronaldpan2005 at yahoo.com.cn>:
>
>  I met the same problem of Stephan Maximilian Huber. *My scenegraph is
> very
> dynamic, lots of geometries get added, recomputed or removed. How to **modify
> the scenegraph to avoid crash after the viewer runs?
> *I have set DataVariance to DYNAMIC. *My code Crashes too. I am using VC
> and WinForm.*
> void OSGForm::AddSceneData(osg::ref_ptr<osg::Group> mModel)
> {
>  // Add the model to the scene
>     mRoot->addChild(mModel.get());
>  // Set the Scene Data
>     mViewer->setSceneData(mRoot.get());
>     // Realize the Viewer
>     mViewer->realize();
> }
>
> void OSGForm::Render(void* ptr)
> {
>     OSGForm* osg = (OSGForm*)ptr;
>     osgViewer::Viewer* viewer = osg->getViewer();
>     while(!viewer->done())
>     {
>         viewer->fr
> ame();
>     }
>     _endthread();
> }
>
> ------------------------------
> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!<http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
********************************************
Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080128/f2b705fd/attachment.htm 


More information about the osg-users mailing list