From 73fbc05a6b6af52825c792902d7738f9cad7ec2f Mon Sep 17 00:00:00 2001 From: fredb Date: Sun, 14 Jun 2009 11:01:37 +0000 Subject: [PATCH] Projection matrix and texture size should be coherent --- src/Instrumentation/od_gauge.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Instrumentation/od_gauge.cxx b/src/Instrumentation/od_gauge.cxx index 820f0a9d8..e5eed1efc 100644 --- a/src/Instrumentation/od_gauge.cxx +++ b/src/Instrumentation/od_gauge.cxx @@ -56,8 +56,7 @@ void FGODGauge::allocRT () { camera = new osg::Camera; // Only the far camera should trigger this texture to be rendered. camera->setNodeMask(simgear::BACKGROUND_BIT); - camera->setProjectionMatrix(osg::Matrix::ortho2D(-256.0, 256.0, -256.0, - 256.0)); + camera->setProjectionMatrix(osg::Matrix::ortho2D(-textureWH/2.0, textureWH/2.0, -textureWH/2.0, textureWH/2.0)); camera->setViewport(0, 0, textureWH, textureWH); camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera->setRenderOrder(osg::Camera::PRE_RENDER);