From a7ba138dc7493d4c6bf10e54dad71069af578f2e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 31 Mar 2015 16:23:43 +0000 Subject: [PATCH] Introduced osg::Camera::resize(..) method and associated enum thus: enum ResizeMask { RESIZE_VIEWPORT=1, RESIZE_ATTACHMENTS=2, RESIZE_PROJECTIONMATRIX=4, RESIZE_DEFAULT=RESIZE_VIEWPORT|RESIZE_ATTACHMENTS }; /** Resize, to the specified width and height, the viewport, attachments and projection matrix according to the resizeMask provided. * Note, the adjustment of the projection matrix is done if the RESIZE_PROJECTIONMATRIX mask to set and according to the rules specified in the ProjectionResizePolicy. */ void resize(int width, int height, int resizeMask=RESIZE_DEFAULT); git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14811 16af8721-9629-0410-8352-f15c8da7e697 --- examples/osgdistortion/osgdistortion.cpp | 14 ++------ include/osg/Camera | 13 ++++++++ src/osg/Camera.cpp | 41 ++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/examples/osgdistortion/osgdistortion.cpp b/examples/osgdistortion/osgdistortion.cpp index c32877d60..feb088ee7 100644 --- a/examples/osgdistortion/osgdistortion.cpp +++ b/examples/osgdistortion/osgdistortion.cpp @@ -108,13 +108,6 @@ public: { } - void resizeRTTCamera(osg::Camera* camera,unsigned int width, unsigned int height) - { - camera->setViewport(0, 0, width, height); - - camera->resizeAttachments(width, height); - } - virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv) { osg::Camera* camera = dynamic_cast(object); @@ -130,11 +123,8 @@ public: OSG_NOTICE<<" WindowWidth="<