Hey Eron, The code inside Producer::RenderSurface_Win32 that used to dispatch that event is commented out (I'm not sure why). When I uncomment it, the mouse coordinates get messed up because producer normalizes them before dispatching the mouse event to the osgGA KeyboardMouse callback, and the osgGA event queue also normalizes them against the window dimensions. Since the window dimensions default to 1x1, the normalize calculation in osgGA::EventQueue is a no-op, unless it gets the window resize event and updates the window dimension (perhaps that's why the resize event is no longer dispatch?).
Hope that convoluted explanation helps :p Chase > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of Eron Steger > Sent: Thursday, April 05, 2007 12:17 PM > To: [email protected] > Subject: [osg-users] Window resize events + Mouse position > > Hello, > > I'm currently working with latest stable release of OSG (1.1), using > osgProducer to render the scene. I would like to know if there is a way > to determine when the window has been resized. I've tried handling the > 'osgGA::GUIEventAdapter::RESIZE' event, but it doesn't appear to > actually be called. Is this something that is (or planned to be) used > in the SVN version with osgViewer? > > Also, when getting mouse events, it appears as though the maximum and > minimum x/y positions are always 1 and -1. Is this different if you > have multiple views of the same scene? Ideally I would like these > coordinates to be in pixel space, but if that is no the intent I suppose > I can still get the pixel using osgProducer::computePixelCoords. > > Thanks > > - Eron > _______________________________________________ > 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/
