Hi Aliastair.

Interesting problem, not one I had thought of before.  The idea of setting
done to true when all the views are closed is just a mechanism to ensure
exit from the frame loop.  When adding views back in it certainly should be
possible to get the frame loop restarted so _done should be reset to false.
  In your own app just having your own frame loop that doesn't check
viewer.done() would also resolve the issue and won't require any
modifications to the core OSG.

I will look at the the core OSG to make sure it resets _done to false, it
might not be possible to get this fix into OSG-3.2 branch though as it
might require API changes.

Robert.


On 13 September 2013 12:01, Alistair Baxter <[email protected]> wrote:

> I've only just got round to reading this, but for the sake of
> clarification, I think I know what your problem was.
>
> OSG will run perfectly happily at the start with a CompositeViewer but no
> views. But after some are created, as soon as they are all destroyed, the
> CompositeViewer decides that it's finished with and enters a kind of
> 'living death' state, where it won't try to render anything anymore - in
> code terms ViewerBase::_done is set.
>
> The only thing you can do at this point is destroy the CompositeViewer and
> make a new one when you want a new scene. Our application has multiple
> types of view windows, not all using OpenSceneGraph, so that is a problem
> we have had to face.
>
> I'd really rather not have to do this, so it would be nice if
> CompositeViewer was changed, even optionally, to be allowed to exist with
> no views in it.  Perhaps is a view is added to a compositeViewer that is
> "_done", the value could be set back to false?
>
>
>
> Alistair Baxter
> Software Engineer
> ________________________________
> Our September newsletter is now available to view online:
> http://www.mve.com/news
> Midland Valley Exploration Ltd.
> 144 West George Street
> Glasgow G2 2HG
> United Kingdom
> Tel:     +44 (0) 141 332 2681
> Fax:    +44 (0) 141 332 6792
> The structural geology experts
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to