[osg-users] Making the composite window disappear

Sashidhar Guntury sashidhar.moony at gmail.com
Fri Oct 19 01:15:27 PDT 2007


          I'm using the composite viewer, to make a program wherein there
are two views of the entire scene. The main view is spread across the screen
while the other view lies in a corner. I want the the smaller view to
disappear when I click on it (left click.)  My handle function is --

 bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
        osgViewer::View* view = dynamic_cast<osgViewer::View*>(&aa);
        if (!view) return false;

        if (ea.getEventType() == osgGA::GUIEventAdapter::RELEASE){
                    cout << "Killed the map!!" << endl;
        return false;

                                       But when I click on the smaller view,
it prints "Killed the map", but the view still remains there. Why does it
happen that way? Isn't viewer.frame() supposed to display a completely new,
updated frame?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071019/c314bb4c/attachment-0002.htm>

More information about the osg-users mailing list