Here is a minimal program that demonstrates the issue.
OSG 3.2: the mouse scroll wheel works in the inset view; all other mouse
events "pass through" to the underlying view.
OSG 3.1.4: works as expected.
#include <osgViewer/CompositeViewer>
#include <osgDB/ReadFile>
int main(int argc, char** argv)
{
osg::ArgumentParser arguments(&argc,argv);
osg::Node* node = osgDB::readNodeFiles(arguments);
if ( !node ) return -1;
osgViewer::CompositeViewer cv( arguments );
osgViewer::View* mainview = new osgViewer::View();
mainview->setUpViewInWindow( 100, 100, 1600, 1024 );
mainview->setSceneData( node );
cv.addView( mainview );
osg::GraphicsContext* gc = mainview->getCamera()->getGraphicsContext();
osg::Camera* camera = new osg::Camera();
camera->setGraphicsContext( gc );
camera->setViewport( 20, 20, 700, 500 );
camera->setProjectionMatrixAsPerspective( 45.0, 7.0/5.0, 1.0, 1e6 );
osgViewer::View* insetview = new osgViewer::View();
insetview->setCamera( camera );
insetview->setSceneData( node );
cv.addView( insetview );
cv.run();
}
Glenn Waldron / @glennwaldron
On Fri, Nov 1, 2013 at 3:47 PM, Glenn Waldron <[email protected]> wrote:
> Hi folks,
>
> I have an app that uses a CompositeViewer with one "Master" View that
> fills the window and multiple "inset" Views that sit on top of the main
> View. All Views share the same scene graph, but you can manipulate each one
> separately.
>
> In OSG 3.1.4 this worked, but after upgrading the OSG 3.2, now none of the
> "inset" Views response to the mouse (except for the scroll wheel, which
> oddly appears for work as before). Instead, mouse actions in any inset are
> handled only by the "master" View.
>
> I've tracked some significant changes in View.cpp and related classes but
> before delving too deeply I'd love to hear whether anyone's seen or
> addressed this issue first. Thanks to all.
>
> Glenn Waldron / @glennwaldron / osgEarth
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org