From: timoore Date: Tue, 30 Dec 2008 23:36:51 +0000 (+0000) Subject: Set BACKGROUND_BIT as camera node mask. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74031287b4d60f789a90248bcdc0dc3cfba5d17f;hp=ada7f622d719c961015b148acfc1274e51f52cdc;p=flightgear.git Set BACKGROUND_BIT as camera node mask. This prevents the dreaded black rectangle from appearing on systems that don't have OpenGL frame buffer object support. --- diff --git a/src/Instrumentation/od_gauge.cxx b/src/Instrumentation/od_gauge.cxx index 25184450c..820f0a9d8 100644 --- a/src/Instrumentation/od_gauge.cxx +++ b/src/Instrumentation/od_gauge.cxx @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -53,6 +54,8 @@ FGODGauge::FGODGauge() : 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->setViewport(0, 0, textureWH, textureWH);