Re: [osg-users] BUG: osgGA::GUIEventAdapter returns wrong mouse ranges on android
Hi Paul, The osgGA::GUIEventAdapter has an MouseYOrientation value that provides information on which way up the Y axis is. OpenGL has Y going up, while most UI toolkits have Y going down, to handle this discrepency osgGA::GUIEventAdapter provides the MouseYOrigentation and other utilities adapt it to make sure it's in the correct default OSG orientation which is Y up - consistent with OpenGL. Robert. On 17 June 2014 01:48, Paul aquawic...@hotmail.com wrote: I can confirm this issue. For android I use setUpViewerAsEmbeddedInWindow(0, 0, width, height) and then setMouseInputRange(0, 0, width, height). I then send the input via getEventQueue()-mouseButtonPress(x, y, button); The input coordinates from android seem to be correct at this point, although it's flipped on the y axis. Now, when I catch and use the events to use in OSG, the coordinates are off. Is there an easy fix? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59764#59764 ___ 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] BUG: osgGA::GUIEventAdapter returns wrong mouse ranges on android
I can confirm this issue. For android I use setUpViewerAsEmbeddedInWindow(0, 0, width, height) and then setMouseInputRange(0, 0, width, height). I then send the input via getEventQueue()-mouseButtonPress(x, y, button); The input coordinates from android seem to be correct at this point, although it's flipped on the y axis. Now, when I catch and use the events to use in OSG, the coordinates are off. Is there an easy fix? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59764#59764 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] BUG: osgGA::GUIEventAdapter returns wrong mouse ranges on android
Dear OSG users, the methods GUIEventAdapter.getXmin, GUIEventAdapter.getXmax, GUIEventAdapter.getYmin, GUIEventAdapter.getYmax ... always return mouse input ranges of -1...1 instead of e.g. 0...1280, 0...800. Because of this bug, the standard picking handler is not working. The viewer is created by calling viewer-setUpViewerAsEmbeddedInWindow as done in the android demo. This also happens, even if eventQueue-setMouseInputRange is called with the appropriate screen dimensions. Is there another way to tell the eventqueue, what the input ranges are? Cheers, Martin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org