]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/od_gauge.hxx
Make traffic take-off roll look a little better.
[flightgear.git] / src / Instrumentation / od_gauge.hxx
index 7d5ebf4ee1ba73d6804a4a5215138af225b8f9d9..7c4ee00edb5889976e4976f11e4a3f6ae2e64cfe 100644 (file)
@@ -29,6 +29,9 @@
 #ifndef _OD_GAUGE_HXX
 #define _OD_GAUGE_HXX
 
+#include <Canvas/canvas_fwd.hpp>
+#include <Canvas/placement.hxx>
+
 #include <osg/NodeCallback>
 #include <osg/Group>
 
@@ -38,14 +41,13 @@ namespace osg {
 }
 
 class SGPropertyNode;
-typedef std::vector<osg::ref_ptr<osg::Group> > Placements;
 
 /**
  * Owner Drawn Gauge helper class.
  */
 class FGODGauge
 {
-public:
+  public:
     FGODGauge();
     virtual ~FGODGauge();
 
@@ -96,6 +98,12 @@ public:
                       int coverage_samples = 0,
                       int color_samples = 0 );
 
+    /**
+     * Enable/Disable updating the texture (If disabled the contents of the
+     * texture remains with the outcome of the last rendering pass)
+     */
+    void setRender(bool render);
+
     /**
      * Say if we can render to a texture.
      * @return true if rtt is available
@@ -109,7 +117,9 @@ public:
      * @param new_texture dynamic texture to replace the old one
      * @return A list of groups which override the given texture
      */
-    Placements set_texture(const char * name, osg::Texture2D* new_texture);
+    static
+    canvas::Placements set_texture( const char * name,
+                                    osg::Texture2D* new_texture );
 
     /**
      * Replace an opengl texture name inside the aircraft scene graph.
@@ -125,9 +135,10 @@ public:
      *        object
      * @return A list of groups which override the given texture
      */
-    Placements set_texture( const SGPropertyNode* placement,
-                            osg::Texture2D* new_texture,
-                            osg::NodeCallback* cull_callback = 0 );
+    static
+    canvas::Placements set_texture( const SGPropertyNode* placement,
+                                    osg::Texture2D* new_texture,
+                                    osg::NodeCallback* cull_callback = 0 );
 
     /**
      * Get the OSG camera for drawing this gauge.
@@ -140,7 +151,7 @@ public:
     // Real initialization function. Bad name.
     void allocRT(osg::NodeCallback* camera_cull_callback = 0);
 
-private:
+  private:
     int _size_x,
         _size_y,
         _view_width,