]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/od_gauge.hxx
Allow using the system version of flite and the HTS engine
[flightgear.git] / src / Cockpit / od_gauge.hxx
index 528e0c81475ee450bd36c9ae936d7c75927b6554..e819a8e3b321b97d07559c1066b8470310f775f7 100644 (file)
@@ -39,24 +39,42 @@ class FGODGauge:
     virtual ~FGODGauge();
 
     /**
-     * Replace an opengl texture name inside the aircraft scene graph.
+     * Replace an opengl texture name inside a given branch of the scene graph.
      * This is to replace a static texture by a dynamic one
-     * @param name texture filename
-     * @param new_texture dynamic texture to replace the old one
+     *
+     * @param branch        Scene graph branch to use for search
+     * @param name          texture filename
+     * @param new_texture   dynamic texture to replace the old one
      * @return A list of groups which override the given texture
      */
     static
-    simgear::canvas::Placements set_texture( const char * name,
+    simgear::canvas::Placements set_texture( osg::Node* branch,
+                                             const char * name,
                                              osg::Texture2D* new_texture );
 
     /**
      * Replace an opengl texture name inside the aircraft scene graph.
+     * This is to replace a static texture by a dynamic one
+     *
+     * @param branch        Scene graph branch to search for matching
+     * @param name          texture filename
+     * @param new_texture   dynamic texture to replace the old one
+     * @return A list of groups which override the given texture
+     */
+    static
+    simgear::canvas::Placements
+    set_aircraft_texture( const char * name,
+                          osg::Texture2D* new_texture );
+
+    /**
+     * Replace an opengl texture name inside a given branch of the scene graph.
      * This is to replace a static texture by a dynamic one. The replacement
      * is base on certain filtering criteria which have to be stored in string
      * value childs of the placement node. Recognized nodes are:
      *   - texture  Match the name of the texture
      *   - node     Match the name of the object
      *   - parent   Match any of the object parents names (all the tree upwards)
+     *
      * @param placement the node containing the replacement criteria
      * @param new_texture dynamic texture to replace the old one
      * @param an optional cull callback which will be installed on any matching
@@ -65,9 +83,29 @@ class FGODGauge:
      */
     static
     simgear::canvas::Placements
-    set_texture( const SGPropertyNode* placement,
+    set_texture( osg::Node* branch,
+                 SGPropertyNode* placement,
                  osg::Texture2D* new_texture,
-                 osg::NodeCallback* cull_callback = 0 );
+                 osg::NodeCallback* cull_callback = 0,
+                 const simgear::canvas::CanvasWeakPtr& canvas =
+                   simgear::canvas::CanvasWeakPtr() );
+
+    /**
+     * Replace an opengl texture name inside the aircraft scene graph.
+     *
+     * @param placement the node containing the replacement criteria
+     * @param new_texture dynamic texture to replace the old one
+     * @param an optional cull callback which will be installed on any matching
+     *        object
+     * @return A list of groups which override the given texture
+     */
+    static
+    simgear::canvas::Placements
+    set_aircraft_texture( SGPropertyNode* placement,
+                          osg::Texture2D* new_texture,
+                          osg::NodeCallback* cull_callback = 0,
+                          const simgear::canvas::CanvasWeakPtr& canvas =
+                            simgear::canvas::CanvasWeakPtr() );
 
 };