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: [email protected]
[mailto:[email protected]] 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 <[email protected]> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Attachment: CompositeViewer_Playground.zi_
Description: Binary data

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to