From 323473144a87db732abe0b935506f7abd915115e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 19 Dec 2005 12:00:40 +0000 Subject: [PATCH] Fixed computeWindowMatrix so that it properly accounts for x,y position of the viewport. --- include/osg/Viewport | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osg/Viewport b/include/osg/Viewport index ef7d79c3c..675abd846 100644 --- a/include/osg/Viewport +++ b/include/osg/Viewport @@ -101,7 +101,7 @@ class OSG_EXPORT Viewport : public StateAttribute */ inline const osg::Matrix computeWindowMatrix() const { - return osg::Matrix::translate(1.0f,1.0f,1.0f)*osg::Matrix::scale(0.5f*width(),0.5f*height(),0.5f); + return osg::Matrix::translate(1.0f,1.0f,1.0f)*osg::Matrix::scale(0.5f*width(),0.5f*height(),0.5f)*osg::Matrix::translate(x(),y(),0.0f); } virtual void apply(State& state) const;