]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/ODGauge.cxx
Add simple keyboard event demo application.
[simgear.git] / simgear / canvas / ODGauge.cxx
index 3f34f989a8635c27d26fc88e32066e83e2d83cad..5c547eafa1af784ddc0cfffb46f278bad1cae190 100644 (file)
@@ -29,6 +29,7 @@
 #endif
 
 #include "ODGauge.hxx"
+#include "Canvas.hxx"
 #include "CanvasSystemAdapter.hxx"
 
 #include <simgear/debug/logstream.hxx>
@@ -123,12 +124,6 @@ namespace canvas
     clear();
   }
 
-  //----------------------------------------------------------------------------
-  void ODGauge::setSystemAdapter(const SystemAdapterPtr& system_adapter)
-  {
-    _system_adapter = system_adapter;
-  }
-
   //----------------------------------------------------------------------------
   void ODGauge::setSize(int size_x, int size_y)
   {
@@ -262,8 +257,8 @@ namespace canvas
     updateSampling();
     updateBlendMode();
 
-    if( _system_adapter )
-      _system_adapter->addCamera(camera.get());
+    if( Canvas::getSystemAdapter() )
+      Canvas::getSystemAdapter()->addCamera(camera.get());
 
     _flags |= AVAILABLE;
   }
@@ -279,8 +274,8 @@ namespace canvas
   //----------------------------------------------------------------------------
   void ODGauge::clear()
   {
-    if( camera.valid() && _system_adapter )
-      _system_adapter->removeCamera(camera.get());
+    if( camera.valid() && Canvas::getSystemAdapter() )
+      Canvas::getSystemAdapter()->removeCamera(camera.get());
     camera.release();
     texture.release();