From: fredb Date: Sun, 14 Jun 2009 11:01:37 +0000 (+0000) Subject: Projection matrix and texture size should be coherent X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=73fbc05a6b6af52825c792902d7738f9cad7ec2f;p=flightgear.git Projection matrix and texture size should be coherent --- 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);