X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fod_gauge.hxx;h=7c4ee00edb5889976e4976f11e4a3f6ae2e64cfe;hb=7d547d128702a643c40b54809e2b4e1a38c4a16d;hp=7d5ebf4ee1ba73d6804a4a5215138af225b8f9d9;hpb=373d511c6948ae4737b183e0ac38471544b6f499;p=flightgear.git diff --git a/src/Instrumentation/od_gauge.hxx b/src/Instrumentation/od_gauge.hxx index 7d5ebf4ee..7c4ee00ed 100644 --- a/src/Instrumentation/od_gauge.hxx +++ b/src/Instrumentation/od_gauge.hxx @@ -29,6 +29,9 @@ #ifndef _OD_GAUGE_HXX #define _OD_GAUGE_HXX +#include +#include + #include #include @@ -38,14 +41,13 @@ namespace osg { } class SGPropertyNode; -typedef std::vector > 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,