Hi Glenn,
In osg::Camera there is:
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; }
/** Get the policy used to determine if and how the projection
matrix should be adjusted on window resizes. */
inline ProjectionResizePolicy getProjectionResizePolicy()
const { return _projectionResizePolicy; }
So just do:
viewer.getCamera()->setProjectionResizePolicy(osg::Camera::FIXED);
Robert.
On Dec 20, 2007 10:23 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote:
> I'm upgrading an application from OSG 1.2 to OSG 2.2. I used the
> Producer::Camera::setLensAutoAspectRatio(false) method to "unbind" the
> camera's aspect ratio from the window's aspect ratio so I can control it
> explicitly. What's the best way to achieve this with osgViewer? I'm using an
> embedded GraphicsWindowsWin32, btw.Thanks. -gw
>
> --
> Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org