Fixed computeWindowMatrix so that it properly accounts for x,y position of the viewport.
This commit is contained in:
parent
a1cfdca94d
commit
323473144a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user