]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/od_gauge.cxx
bind the sky disable cutoff distance to a property
[flightgear.git] / src / Instrumentation / od_gauge.cxx
index 820f0a9d8744d2de031d82a7484731634f41d9e7..349d7fdbfd7538534e963e3436f1b7cb08ce5590 100644 (file)
@@ -38,7 +38,6 @@
 #include <osgDB/FileNameUtils>
 
 #include <simgear/scene/util/RenderConstants.hxx>
-#include <simgear/screen/extensions.hxx>
 #include <simgear/debug/logstream.hxx>
 
 #include <Main/globals.hxx>
@@ -56,8 +55,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);
@@ -99,10 +97,10 @@ void FGODGauge::allocRT () {
 //         rt->Reset("rgba ctt");
 
 //     if( rt->Initialize(256, 256, true) ) {
-//         SG_LOG(SG_ALL, SG_INFO, "FGODGauge:Initialize sucessfull");
+//         SG_LOG(SG_INSTR, SG_INFO, "FGODGauge:Initialize sucessfull");
 //         if (rt->BeginCapture())
 //         {
-//             SG_LOG(SG_ALL, SG_INFO, "FGODGauge:BeginCapture sucessfull, RTT available");
+//             SG_LOG(SG_INSTR, SG_INFO, "FGODGauge:BeginCapture sucessfull, RTT available");
 //             rtAvailable = true;
 //             glViewport(0, 0, textureWH, textureWH);
 //             glMatrixMode(GL_PROJECTION);
@@ -126,9 +124,9 @@ void FGODGauge::allocRT () {
 //             glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA );
 //             rt->EndCapture();
 //         } else
-//             SG_LOG(SG_ALL, SG_WARN, "FGODGauge:BeginCapture failed, RTT not available, using backbuffer");
+//             SG_LOG(SG_INSTR, SG_WARN, "FGODGauge:BeginCapture failed, RTT not available, using backbuffer");
 //     } else
-//         SG_LOG(SG_ALL, SG_WARN, "FGODGauge:Initialize failed, RTT not available, using backbuffer");
+//         SG_LOG(SG_INSTR, SG_WARN, "FGODGauge:Initialize failed, RTT not available, using backbuffer");
 }
 
 FGODGauge::~FGODGauge() {