[osg-users] Open/Close the window on win32

brettwiesner brettwiesner at gmail.com
Thu Sep 11 08:09:01 PDT 2008


Recycling context id's is something that seems fixed in 2.6.0. I'm not 
sure if you can keep a graphics context around without a window however 
you can keep the scene graph around. Just hold onto a ref ptr to the 
root node of your scene graph. You should be able to open a new window 
and create a new viewer and pass in the root node of the SG you've kept 

(I'm not sure if video's/ animations will still be played though. Try it 


christophe loustaunau wrote:
> Hello,
> This is something I'd like to make available as well. I have tried to
> implement a function that restores the previous graphic context one
> the window as been closed. Nothing has been successful. Is such a
> thing possible with osg?
> Thanks
> On Tue, Sep 9, 2008 at 3:00 PM, Lucas Lallement 
> <lucas.lallement at gmail.com <mailto:lucas.lallement at gmail.com>> wrote:
>     Hey all,
>     My software receives orders such as play, pause but also close and
>     open window.
>     I was wondering what was the best way to close (or hide) the osgViewer
>     window on win32 to later on reopen it without having lost what is
>     going on (video being played on a node).
>     Everything I have tried so far makes me loose the context when I
>     reopen the window.
>     I am using osg 2.4.0 on Windows 2000 with a Nvidia GeForce 7800GS
>     Regards,
>     Lucas Lallement
>     _______________________________________________
>     osg-users mailing list
>     osg-users at lists.openscenegraph.org
>     <mailto:osg-users at lists.openscenegraph.org>
>     http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> -- 
> Christophe Loustaunau.
> ------------------------------------------------------------------------
> _______________________________________________
> 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