Re: [osg-users] CompositeViewer issues
A while back I sent an email regarding a bug in CompositeViewer. Please see the text below. I've also reattached the code for convenience. The bug still exists in the trunk code and I am currently trying to resolve it. I am trying to get a little better understanding before I submit any possible changes. Basically my question is when the frame of the window/graphics context is selected (but the mouse has not yet been over any views within the window), what view do you send/address events to? I think the main thing that I am wondering is since a context can contain multiple views, is there a "master" view per context? Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Huber Sent: Monday, September 27, 2010 9:07 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] CompositeViewer issues Has anyone had a chance to try the sample program I posted to see if the bug is the same in Linux? Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Huber Sent: Thursday, September 23, 2010 1:22 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] CompositeViewer issues Robert, Attached is a simple stripped down app that demonstrates the problem. The program creates two windows (2 views total). The 1st has a HUD and the 2nd doesn't. Resizing the 2nd window causes the HUD in the first window to resize (it shouldn't). I am reliably producing this bug on my Win7 machine. I'm quite confident that this bug will be reproducible on all Windows. I am a little bit less sure of Linux/Mac, etc. I've included a Visual Studio 2005 project but since there is only one source file it should be easy to get it building under Linux. Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, September 22, 2010 2:25 AM To: OpenSceneGraph Users Subject: Re: [osg-users] CompositeViewer issues Hi Brad, Could you see if you can reproduce this problem with the one of the OSG examples, or a small tweak of one to reproduce this problem. If I can reproduce it reliably then there is a much better chance of spotting the culprit and finding a solution. Cheers, Robert. On Tue, Sep 21, 2010 at 10:27 PM, Brad Huber wrote: > Hello, > > > > I recently converted our osg based application over to use Composite Viewer > because we need multiple Views on the same scene graph. Im running > in to a > little snag which appears to be a bug in CompositeViewer. > > > > Simple way of explaining the manifestation of the issue is that I have > two Windows and two Views (one view per window) and they both have > event handlers attached to the views which react to the > osgGA::GUIEventAdapter::RESIZE event. Resizing works hunky dory for > view 0 > but it does not work correctly for view 1. I believe the culprit is related > to these lines of code found in CompositeViewer::eventTraversal(). > > > > osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : > _views[0].get(); > > . > > . > > . > > viewEventsMap[masterView].insert( viewEventsMap[masterView].end(), > gw_events.begin(), gw_events.end() ); > > > > The problem is that when resizing, apparently getViewWithFocus() > returns NULL (I guess because the mouse is over the window frame and > not the view within the window. Therefore a resize event is taken out > of the graphics window queue for the 2nd window and stuck into the > event queue for the 0 view (a mismatch). The effect for me is that > the when I resize one window the HUD I have set up in the other window > receives the resize event and changes which obviously isnt what I want J. > > > > This does seem to be somewhat intermittent and may be related to > whether your mouse tends to fall off the window frame towards the view > or away from > the view > > > > PS I dont have a solution in hand yet. I thought I would throw this > out there in case its a known issue or something. > > > > Thanks > > -Brad > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph
Re: [osg-users] CompositeViewer issues
Hi Brad, On Mon, Sep 27, 2010 at 4:07 PM, Brad Huber wrote: > Has anyone had a chance to try the sample program I posted to see if the bug > is the same in Linux? I haven't had a chance yet. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer issues
Has anyone had a chance to try the sample program I posted to see if the bug is the same in Linux? Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Huber Sent: Thursday, September 23, 2010 1:22 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] CompositeViewer issues Robert, Attached is a simple stripped down app that demonstrates the problem. The program creates two windows (2 views total). The 1st has a HUD and the 2nd doesn't. Resizing the 2nd window causes the HUD in the first window to resize (it shouldn't). I am reliably producing this bug on my Win7 machine. I'm quite confident that this bug will be reproducible on all Windows. I am a little bit less sure of Linux/Mac, etc. I've included a Visual Studio 2005 project but since there is only one source file it should be easy to get it building under Linux. Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, September 22, 2010 2:25 AM To: OpenSceneGraph Users Subject: Re: [osg-users] CompositeViewer issues Hi Brad, Could you see if you can reproduce this problem with the one of the OSG examples, or a small tweak of one to reproduce this problem. If I can reproduce it reliably then there is a much better chance of spotting the culprit and finding a solution. Cheers, Robert. On Tue, Sep 21, 2010 at 10:27 PM, Brad Huber wrote: > Hello, > > > > I recently converted our osg based application over to use Composite Viewer > because we need multiple Views on the same scene graph. Im running > in to a > little snag which appears to be a bug in CompositeViewer. > > > > Simple way of explaining the manifestation of the issue is that I have > two Windows and two Views (one view per window) and they both have > event handlers attached to the views which react to the > osgGA::GUIEventAdapter::RESIZE event. Resizing works hunky dory for > view 0 > but it does not work correctly for view 1. I believe the culprit is related > to these lines of code found in CompositeViewer::eventTraversal(). > > > > osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : > _views[0].get(); > > . > > . > > . > > viewEventsMap[masterView].insert( viewEventsMap[masterView].end(), > gw_events.begin(), gw_events.end() ); > > > > The problem is that when resizing, apparently getViewWithFocus() > returns NULL (I guess because the mouse is over the window frame and > not the view within the window. Therefore a resize event is taken out > of the graphics window queue for the 2nd window and stuck into the > event queue for the 0 view (a mismatch). The effect for me is that > the when I resize one window the HUD I have set up in the other window > receives the resize event and changes which obviously isnt what I want J. > > > > This does seem to be somewhat intermittent and may be related to > whether your mouse tends to fall off the window frame towards the view > or away from > the view > > > > PS I dont have a solution in hand yet. I thought I would throw this > out there in case its a known issue or something. > > > > Thanks > > -Brad > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer issues
Robert, Attached is a simple stripped down app that demonstrates the problem. The program creates two windows (2 views total). The 1st has a HUD and the 2nd doesn't. Resizing the 2nd window causes the HUD in the first window to resize (it shouldn't). I am reliably producing this bug on my Win7 machine. I'm quite confident that this bug will be reproducible on all Windows. I am a little bit less sure of Linux/Mac, etc. I've included a Visual Studio 2005 project but since there is only one source file it should be easy to get it building under Linux. Thanks -Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, September 22, 2010 2:25 AM To: OpenSceneGraph Users Subject: Re: [osg-users] CompositeViewer issues Hi Brad, Could you see if you can reproduce this problem with the one of the OSG examples, or a small tweak of one to reproduce this problem. If I can reproduce it reliably then there is a much better chance of spotting the culprit and finding a solution. Cheers, Robert. On Tue, Sep 21, 2010 at 10:27 PM, Brad Huber wrote: > Hello, > > > > I recently converted our osg based application over to use Composite Viewer > because we need multiple Views on the same scene graph. Im running in to a > little snag which appears to be a bug in CompositeViewer. > > > > Simple way of explaining the manifestation of the issue is that I have two > Windows and two Views (one view per window) and they both have event > handlers attached to the views which react to the > osgGA::GUIEventAdapter::RESIZE event. Resizing works hunky dory for view 0 > but it does not work correctly for view 1. I believe the culprit is related > to these lines of code found in CompositeViewer::eventTraversal(). > > > > osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : > _views[0].get(); > > . > > . > > . > > viewEventsMap[masterView].insert( viewEventsMap[masterView].end(), > gw_events.begin(), gw_events.end() ); > > > > The problem is that when resizing, apparently getViewWithFocus() returns > NULL (I guess because the mouse is over the window frame and not the view > within the window. Therefore a resize event is taken out of the graphics > window queue for the 2nd window and stuck into the event queue for the 0 > view (a mismatch). The effect for me is that the when I resize one window > the HUD I have set up in the other window receives the resize event and > changes which obviously isnt what I want J. > > > > This does seem to be somewhat intermittent and may be related to whether > your mouse tends to fall off the window frame towards the view or away from > the view > > > > PS I dont have a solution in hand yet. I thought I would throw this out > there in case its a known issue or something. > > > > Thanks > > -Brad > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org CompositeViewer_Playground.zi_ Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer issues
Hi Brad, Could you see if you can reproduce this problem with the one of the OSG examples, or a small tweak of one to reproduce this problem. If I can reproduce it reliably then there is a much better chance of spotting the culprit and finding a solution. Cheers, Robert. On Tue, Sep 21, 2010 at 10:27 PM, Brad Huber wrote: > Hello, > > > > I recently converted our osg based application over to use Composite Viewer > because we need multiple Views on the same scene graph. I’m running in to a > little snag which appears to be a bug in CompositeViewer. > > > > Simple way of explaining the manifestation of the issue is that I have two > Windows and two Views (one view per window) and they both have event > handlers attached to the views which react to the > osgGA::GUIEventAdapter::RESIZE event. Resizing works hunky dory for view 0 > but it does not work correctly for view 1. I believe the culprit is related > to these lines of code found in CompositeViewer::eventTraversal(). > > > > osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : > _views[0].get(); > > . > > . > > . > > viewEventsMap[masterView].insert( viewEventsMap[masterView].end(), > gw_events.begin(), gw_events.end() ); > > > > The problem is that when resizing, apparently getViewWithFocus() returns > NULL (I guess because the mouse is over the window frame and not the view > within the window. Therefore a resize event is taken out of the graphics > window queue for the 2nd window and stuck into the event queue for the 0 > view (a mismatch). The effect for me is that the when I resize one window > the HUD I have set up in the other window receives the resize event and > changes which obviously isn’t what I want J. > > > > This does seem to be somewhat intermittent and may be related to whether > your mouse tends to fall off the window frame towards the view or away from > the view… > > > > PS I don’t have a solution in hand yet. I thought I would throw this out > there in case it’s a known issue or something. > > > > Thanks > > -Brad > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CompositeViewer issues
Hello, I recently converted our osg based application over to use Composite Viewer because we need multiple Views on the same scene graph. I'm running in to a little snag which appears to be a bug in CompositeViewer. Simple way of explaining the manifestation of the issue is that I have two Windows and two Views (one view per window) and they both have event handlers attached to the views which react to the osgGA::GUIEventAdapter::RESIZE event. Resizing works hunky dory for view 0 but it does not work correctly for view 1. I believe the culprit is related to these lines of code found in CompositeViewer::eventTraversal(). osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() : _views[0].get(); . . . viewEventsMap[masterView].insert( viewEventsMap[masterView].end(), gw_events.begin(), gw_events.end() ); The problem is that when resizing, apparently getViewWithFocus() returns NULL (I guess because the mouse is over the window frame and not the view within the window. Therefore a resize event is taken out of the graphics window queue for the 2nd window and stuck into the event queue for the 0 view (a mismatch). The effect for me is that the when I resize one window the HUD I have set up in the other window receives the resize event and changes which obviously isn't what I want J. This does seem to be somewhat intermittent and may be related to whether your mouse tends to fall off the window frame towards the view or away from the view. PS I don't have a solution in hand yet. I thought I would throw this out there in case it's a known issue or something. Thanks -Brad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org