1 // Owner Drawn Gauge helper class
3 // Moved to SimGear by Thomas Geymayer - October 2012
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #include <Canvas/canvas_fwd.hpp>
26 #include <simgear/canvas/ODGauge.hxx>
27 #include <simgear/canvas/CanvasPlacement.hxx>
32 * Owner Drawn Gauge helper class
35 public simgear::canvas::ODGauge
42 * Replace an opengl texture name inside the aircraft scene graph.
43 * This is to replace a static texture by a dynamic one
44 * @param name texture filename
45 * @param new_texture dynamic texture to replace the old one
46 * @return A list of groups which override the given texture
49 simgear::canvas::Placements set_texture( const char * name,
50 osg::Texture2D* new_texture );
53 * Replace an opengl texture name inside the aircraft scene graph.
54 * This is to replace a static texture by a dynamic one. The replacement
55 * is base on certain filtering criteria which have to be stored in string
56 * value childs of the placement node. Recognized nodes are:
57 * - texture Match the name of the texture
58 * - node Match the name of the object
59 * - parent Match any of the object parents names (all the tree upwards)
60 * @param placement the node containing the replacement criteria
61 * @param new_texture dynamic texture to replace the old one
62 * @param an optional cull callback which will be installed on any matching
64 * @return A list of groups which override the given texture
67 simgear::canvas::Placements
68 set_texture( const SGPropertyNode* placement,
69 osg::Texture2D* new_texture,
70 osg::NodeCallback* cull_callback = 0 );
74 #endif // _OD_GAUGE_HXX