Hi Don,

Thanks for pin pointing this.  The problem is down to a missing ",false" at the end of the setWindowSize(..) call, as the default value was true, which makes the GUIEventAdapter update the InputRange as well - somethng appropriate for most GUI toolkits, but not Producer as it has the concept of InputArea so window size and mouse input range are decoupled.

I have checked in this fix. 

Robert.

On 9/29/06, Don Burns <[EMAIL PROTECTED]> wrote:
Hi Robert and welcome back!

I'm seeing the problem in osgviewer (I haven't tried the others), but indeed the code you indicate below is where the problem was first introduced.  When I comment this out things work.  However, I did notice that sometimes after window size changes the origin of the mouseX and mouseY. 

After pounding on it for a while, I think I found the problem.  You are passing the Windows size (1280x1024) to setInputRange() in GUIEventAdapter::setWindowRectangle().  I believe the input range expects to be something like -1, -1, 1, 1, not 0, 0, 1280, 1024

-don

On 9/29/06, Robert Osfield < [EMAIL PROTECTED]> wrote:
On 9/29/06, Don Burns <[EMAIL PROTECTED]> wrote:
Ah, yes! finally someone else who has seen the problem.  The problem is not, actually, that the there is no response, but that the response is so minimal that you are not seeing much change on the screen.  It is a scaling issue with mouse positions.

Which examples have a problem?  I haven't seen this problem, and just checked to see if everything is checked in and it looks ok.

I've tracked this down to a new (I think new) updateWindowSIze() method in osgProducer::KeyboardMouseCallback.  This is called in every single method of the class, and goes to great lengths to recreate what is already available from Producer::InputArea:;getExtents(), so I'm not sure what the intent is there.  I simply put a return statement at the top of the updateWindowSize() method and things seem to be back to (almost normal). 

KeyboardMouseCallback::updateWindowSize() has been around for a very long time.  The only change to it has been the addition of the lines at the end of the function:

    if (rs)
    {
        ea->setWindowRectangle(rs->getWindowOriginX(), rs->getWindowOriginY(), rs->getWindowWidth(),rs->getWindowHeight());
    }

W.r.t input area extents, I'm afraid I can't recall why I added all the input area code, perhaps it was something missing from Producer::InputArea when I first wrote, or perhaps it didn't have the correct behavior.  This input area is original and hasn't changed with the new addition of the lines above.  There also still needs to be a fallback for when no input area is required. 

Robert is still busy and probably won't get caught up on the backlog until next week, but the above should get you up and running in the mean time.

I am back earlier than planned so will be able to do some work over this weekend.  Right now I'm just trying to catch up on urgent mail.

Robert.


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to