Hi Gianluca, By default the OSG automatically updates the projection matrix when window is resized, but you can disable this using the Camera method:
enum ProjectionResizePolicy { FIXED, /** Keep the projection matrix fixed, despite window resizes.*/ HORIZONTAL, /** Adjust the HORIZOTNAL field of view on window resizes.*/ VERTICAL /** Adjust the VERTICAL field of view on window resizes.*/ }; /** Set the policy used to determine if and how the projection matrix should be adjusted on window resizes. */ inline void setProjectionResizePolicy(ProjectionResizePolicy policy) { _projectionResizePolicy = policy; } Robert. On Wed, Nov 19, 2008 at 11:24 AM, Gianluca Natale <[EMAIL PROTECTED]> wrote: > I'm trying to set the projection matrix by the camera, > just before calling a camera->frame. > But, as soon as "frame" returns, the projection matrix > is changed in the left and right clipping planes. > Since the redraw is called as a consequence of a resize event, > and the viewport is updated consequently, is there > a relationship between the projection matrix and the viewport? > > In OpenGL there isn't any relationship, I mean that I can > set the viewport independently of the projection matrix. > But it seems that OSG doesn't want to distort the > original scene. If so, is it the default behavior? > How can I disable such a behavior? > > Thanks, > Gianluca > > > > _______________________________________________ > 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