Re: [osg-users] Frame Event Button Mask Bug?

2012-06-15 Thread Robert Osfield
Hi James,

On 13 June 2012 20:21, James Adkison  wrote:
> Per your request, I am following up on this as a reminder for you to look 
> into this and/or get the results of what you found.

Thanks for the reminder. Third time lucky :-)

I spent a bit of time yesterday reproducing the problem, and this
morning I sussed out the cause.  Between 2.8.x and 3.x I revamped the
way that event timing we done so that we didn't end up with negative
time delta on events, such as getting events in after the frame has
started, and with this the creation of the frame() event moved to the
Viewer::advance() method.  Unfortunately with this change the event
state passed such as button mask assigned to the frame event came from
the previous frames event state, rather the event state after looking
at all the events for the current frame, this meant the button mask
and mouse values ended up being one frame behind for the viewer's
frame event.

The solution was to move the frame() event call into
Viewer::eventTraversal() and do it after the event state has been
accumulated from the events collected from the windows.  Could you try
the svn/trunk version of the OSG to see if this works for you.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Frame Event Button Mask Bug?

2012-06-13 Thread James Adkison
Hi Robert,

Per your request, I am following up on this as a reminder for you to look into 
this and/or get the results of what you found.

Thanks,
James

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48291#48291





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-25 Thread Robert Osfield
HI James,

On 24 April 2012 18:31, James Adkison  wrote:
> Just curious if you ever got around to looking at this and if so what your 
> conclusions/thoughts were.

I'm afraid I haven't yet had a chance - been tackling the
server/website side and now even have the build of a new office space
to juggle so won't be able to look at it right away.

Please ping me about it though, make sure I don't overlook it once I
get back to a more normal working day.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-24 Thread James Adkison
Hi Robert,

Just curious if you ever got around to looking at this and if so what your 
conclusions/thoughts were.

Thanks,
James

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=47266#47266





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-03 Thread James Adkison
Hi Robert,

Yes, I did make minor changes to the example code.  The osgkeyboardmouse 
changes are identical for both OSG 2.8.2 and 3.0.1 but I attached both patches 
anyway.

Below I have listed the output from the modified example and add some comments.

osgkeyboardmouse example run (2.8.2):
// application execution begins
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0
// mouse pressed and continuously held down
mouse pressed
// first frame after mouse press event, this frame event's button mask does 
indicate the mouse button is pressed
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
// mouse button released
mouse release

// first frame does indicate the button was released
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0

osgkeyboardmouse example run (3.0.1):
// application execution begins
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0
// mouse pressed and continuously held down
mouse pressed
// first frame after mouse press event, this frame event's button mask does NOT 
indicate the mouse button is pressed
frame: mask = 0
// the subsequent frame events all DO indicate the mouse button is pressed
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
// mouse is released
mouse released

// Now similar behavior is seen as with mouse press, first frame state the 
mouse button is pressed
frame: mask = 1
// Subsequent frames state the mouse button is not pressed
frame: mask = 0
frame: mask = 0
frame: mask = 0

I hope this helps make things more clear, let me know if anything is still 
unclear.

Thanks,
James

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46773#46773




Attachments: 
http://forum.openscenegraph.org//files/osgkeyboardmouse_diff_301_513.txt
http://forum.openscenegraph.org//files/osgkeyboardmouse_diff_282_108.txt


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-03 Thread Robert Osfield
HI James,

I was not aware of this difference in behavior and don't recall a
change that specifically might change this, there were a number of
internal changes though, perhaps one of this introduced the different
behaviour.  When you say you see the same behaviour with the
osgkeyboardmouse example could you explain more specifically what to
look for in this example, do you have to modify the sources?  If so
could you provide the changes.

Thanks,
Robert.

On 3 April 2012 12:25, James Adkison  wrote:
> Hi,
>
> I am working on a project which just upgraded from OSG 2.8.2 to OSG 3.0.1 and 
> some of our code broke during the upgrade.  It was assumed that we had done 
> something wrong and I started debugging and found the following change in 
> behavior.
>
> The following example shows the the observed behavior of our pick handler 
> which sub-classes osgGA::GUIEventHandler and implements the handle(const 
> osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &) method.
>
>
> OSG 2.8.2
> - Mouse press event is detected (left mouse button is pressed and not 
> released)
> - Frame event is detected and the retrieved button mask (i.e. 
> osgGA::GUIEventAdapter::getButtonMask()) does indicate the left mouse button 
> is pressed
>
> OSG 3.0.1
> - Mouse press event is detected (again left mouse button is press and not 
> release)
> - Frame event is detected and the retrieved button mask does NOT indicate the 
> left mouse button is pressed
> ** However, the second frame event after the mouse press event and all 
> subsequent frame events do have button masks which indicate the left mouse 
> button is pressed
>
> This same behavior was also observed in the OSG 3.0.1 osgkeyboardmouse 
> example.
>
> So my question is, was the change in behavior (as described above) 
> intended/expected or a bug?
>
> Thank you in advance,
> James[/b]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=46765#46765
>
>
>
>
>
> ___
> 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] Frame Event Button Mask Bug?

2012-04-03 Thread James Adkison
Hi,

I am working on a project which just upgraded from OSG 2.8.2 to OSG 3.0.1 and 
some of our code broke during the upgrade.  It was assumed that we had done 
something wrong and I started debugging and found the following change in 
behavior.

The following example shows the the observed behavior of our pick handler which 
sub-classes osgGA::GUIEventHandler and implements the handle(const 
osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &) method.


OSG 2.8.2
- Mouse press event is detected (left mouse button is pressed and not released)
- Frame event is detected and the retrieved button mask (i.e. 
osgGA::GUIEventAdapter::getButtonMask()) does indicate the left mouse button is 
pressed

OSG 3.0.1
- Mouse press event is detected (again left mouse button is press and not 
release)
- Frame event is detected and the retrieved button mask does NOT indicate the 
left mouse button is pressed
** However, the second frame event after the mouse press event and all 
subsequent frame events do have button masks which indicate the left mouse 
button is pressed

This same behavior was also observed in the OSG 3.0.1 osgkeyboardmouse example.

So my question is, was the change in behavior (as described above) 
intended/expected or a bug?

Thank you in advance,
James[/b]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=46765#46765





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org