]> git.mxchange.org Git - simgear.git/commitdiff
Use ref-ptr in canvas adapter getImage
authorJames Turner <zakalawe@mac.com>
Sat, 26 Mar 2016 19:55:37 +0000 (19:55 +0000)
committerJames Turner <zakalawe@mac.com>
Sat, 26 Mar 2016 19:55:37 +0000 (19:55 +0000)
Adjusted while investigating missing tooltip texture with recent
OSG versions.

simgear/canvas/CanvasSystemAdapter.hxx
simgear/canvas/elements/CanvasImage.cxx
simgear/canvas/elements/CanvasImage.hxx

index 2492bb91c5b82a01f5653ffb318134d56821cb6a..43b3f780811c218c1d83433bc0922107b7becd27 100644 (file)
@@ -37,7 +37,7 @@ namespace canvas
       virtual FontPtr getFont(const std::string& name) const = 0;
       virtual void addCamera(osg::Camera* camera) const = 0;
       virtual void removeCamera(osg::Camera* camera) const = 0;
-      virtual osg::Image* getImage(const std::string& path) const = 0;
+      virtual osg::ref_ptr<osg::Image> getImage(const std::string& path) const = 0;
       virtual SGSubsystem* getSubsystem(const std::string& name) const = 0;
       virtual HTTP::Client* getHTTPClient() const = 0;
   };
index 6c037d703811bfe8d2248bb21784942b42cf4bef..99d332c43ee6fdf1678d8d0dbdad61f4b6fde5be 100644 (file)
@@ -463,7 +463,7 @@ namespace canvas
   }
 
   //----------------------------------------------------------------------------
-  void Image::setImage(osg::Image *img)
+  void Image::setImage(osg::ref_ptr<osg::Image> img)
   {
     // remove canvas...
     setSrcCanvas( CanvasPtr() );
index 2ac255cfc13eea22663d42d3e4ec5efe5859d57f..3e6c7e9d34a82bb9ec4d8174d3cb9a8a13dbc895 100644 (file)
@@ -59,7 +59,7 @@ namespace canvas
       void setSrcCanvas(CanvasPtr canvas);
       CanvasWeakPtr getSrcCanvas() const;
 
-      void setImage(osg::Image *img);
+      void setImage(osg::ref_ptr<osg::Image> img);
       void setFill(const std::string& fill);
 
       /**