[osg-users] OpenSceneGraph 2.19 osgViewer

Robert Osfield robert.osfield at gmail.com
Wed Sep 5 01:43:25 PDT 2007


Hi CG,

2.1.9 should be able handle an null scene data, 2.0 was known to crash
in this situation but I've merged and bug fix to this since 2.0.  If
you are still see this then this is a bug that needs resolving.  Could
you provide a code example that crashes.

W.r.t update, you don't need to call this explicitly, as the frame now
calls this.  Code before in 1.2 was:

   while (!viewer.done())
   {
      viewer.sync();
      viewer.update();
      viewer.frame();
   }

In 2.x you can do:

   while(!viewer.done())
   {
      viewer.frame(); // frame calls everything thing for you
   }

Or you can do it short hand by replacing the above with:

   viewer.run();

Or you can do it long hand by replacing the above with:

  while(!viewer.done())
  {
      viewer.advance();
      viewer.eventTraversal();
      viewer.updateTraversal();
      viewer.renderingTraversals();
  }

The clear up frame calls in 1.2 osgProducer::Viewer are also gone,
there aren't needn't osgViewer::Viewer does clean up by itself.  You
can also stop and start threading if you need to, something that
wasn't possible in 1.2.

Robert.

On 9/5/07, #POH CHENG GUAN# <timpcg at pmail.ntu.edu.sg> wrote:
>
>
> Hi,
>
> Is it possible to just render an empty background without loading a model?
> If I set my viewer->setSceneData(0), osgViewer crashes when it comes to
> viewer->realize().
>
> Does anyone have a porting guide from version 1.2 to 2.19? The online
> version is quite brief, in version 1.2, I will call viewer->update(), what
> is the function that replaces this call for version 2.19?
>
> Regards,
> CG
>
>
> ________________________________
>  **Disclaimer**
>  The sender of this email is NOT authorized to represent or act on behalf of
> Nanyang Technological
>  University in any matter or transaction by means of using this email
> account.
>
>  Nanyang Technological University will not be responsible for any content or
> views expressed in this
>  email and this email does not express the views or opinions of the Nanyang
> Technological University.
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list