Hi Daniele,

The way osgViewer is written is for a Viewer/CompositeViewer to be an
application level object that will usually live throughout the life of
the application, it's not something that would be created/destroyed.

If you want to open/close windows then the natural approach with
osgViewer would be to have a osgViewer::CompositeViewer live
throughout the life of the application, then have any windows that you
want to create/destroy be as osgViewer::View's that get
enabled/disabled, and these View's master Camera, or slave Camera
"have a" handle to the appropriate GraphicsWindow.   It is better to
enable/disable Views/Camera's rather than to create and destroy them.
When doing compute graphics it's very expensive to create/destroy
graphics objects, it's far better to reuse where possible, this
applies to OpenGL and the OSG.

I have no Windows expertise let alone WindowForms so can't comment on
this specific issues that it introduces.  Personally I would much
rather users opt for cross platform solutions rather tie themselves to
a specific OS.  A lot of the OSG/OpenGL capabilities and value die the
minute you start tying them to a specific platform.  This applies to
any platform, while I use Linux day to day, what I'm really focused on
making real-time computer graphics ubiquitous.

Robert.

On 11 January 2018 at 16:37, Daniele Nadalutti <[email protected]> wrote:
> Hi Robert, thank you for your quick reply.
>
> I provide you with more details about my application.
>
> It is under Windows and it embeds osg::Viewer instances into WindowsForms 
> controls by passing their handles to OSG WindowData objects and using them in 
> the traits of the viewers' graphic contexts.
>
> Such WindowsForms controls are then embedded into standard WindowsForms 
> forms. The user can open/close forms during runtime and all those osgViewer 
> instances share the same Scene.
>
> OSG usage is SingleThreaded, and rendering is disabled when creating/deleting 
> osgViewers (as a consequence of opening/closing forms).
>
> The few remaining crashes that I am experiencing are at driver level.
>
> Thank you very much for your support and best regards,
> Daniele
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=72739#72739
>
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to