If this is for a Win32 application, the code in Producer (not
osgProducer) that processes WM_SIZE events and triggers the callback to
add the resize event to osgGA's event queue is currently commented out.
When I uncomment it and rebuild Producer, mouse coordinate tracking gets
messed up because the coordinates are normalized inside the Producer
event processor and again in the osgGA, but as long as a resize event is
never dispatched, osgGA assumes the window is a 1x1 screen.

Chase

 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: Monday, June 04, 2007 3:54 AM
> To: osg users
> Subject: Re: [osg-users] osgProducer::Viewer - Window resize events
> 
> Hi Tommes,
> 
> Producer does not generate resize events, it catches them internally
> and tracks.  On each new frame you can query the window dimensions and
> do what you want with it.  There are also some controls for the aspect
> ratio of the camera lens that you could try out.
> 
> Alternatively you could look at the new osgViewer library, it does
> pass on window resize events that you can catch by attaching the event
> handling to the viewer.  The Camera's on the window being resized will
> also be automatically be resized like in Producer, and there are also
> controls of how the projection matrix is adjusted on resize.
> 
> Robert.
> 
> On 6/4/07, Tommes <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I need to handle window resize events in my application, which is
> > based on osgProducer::Viewer. I want to avoid the viewer from
> > automatically scaling the scene to fit in the new window (for
example
> > when toggling from fullscreen to window mode). What's the best way
to
> > do this?
> > Where does Producer handle this event? Or is this done by the OS?
> >
> > Any advices appreciated.
> > Tommes
> > _______________________________________________
> > 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