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
This commit is contained in:
Robert Osfield
2015-03-31 16:23:43 +00:00
parent 99f7bfab3b
commit a7ba138dc7
3 changed files with 56 additions and 12 deletions

View File

@@ -430,6 +430,19 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
void resizeAttachments(int width, int height);
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);
/** Explicit control over implicit allocation of buffers when using FBO.
Implicit buffers are automatically substituted when user have not attached such buffer.