diff Samples/Sdl/TrackerSampleApp.h @ 900:f9ae731fdc25 am-dev

Merge
author Alain Mazy <alain@mazy.be>
date Tue, 16 Jul 2019 12:42:31 +0200
parents 0c5201499af8
children a911f5bb48da
line wrap: on
line diff
--- a/Samples/Sdl/TrackerSampleApp.h	Tue Jul 16 12:37:29 2019 +0200
+++ b/Samples/Sdl/TrackerSampleApp.h	Tue Jul 16 12:42:31 2019 +0200
@@ -25,6 +25,7 @@
 #include "../../Framework/Scene2DViewport/MeasureTool.h"
 #include "../../Framework/Scene2DViewport/PredeclaredTypes.h"
 #include "../../Framework/Scene2DViewport/ViewportController.h"
+#include "../../Framework/Viewport/SdlViewport.h"
 
 #include <SDL.h>
 
@@ -78,6 +79,18 @@
     void SelectNextTool();
     void CreateRandomMeasureTool();
 
+
+    /**
+    In the case of this app, the viewport is an SDL viewport and it has 
+    a OpenGLCompositor& GetCompositor() method
+    */
+    OpenGLCompositor& GetCompositor();
+
+    /**
+    See the other overload
+    */
+    const OpenGLCompositor& GetCompositor() const;
+
     /**
     This returns a random point in the canvas part of the scene, but in
     scene coordinates
@@ -108,7 +121,6 @@
     void HideInfoText();
 
   private:
-    std::auto_ptr<OpenGLCompositor> compositor_;
     /**
     WARNING: the measuring tools do store a reference to the scene, and it 
     paramount that the scene gets destroyed AFTER the measurement tools.
@@ -130,6 +142,7 @@
 
     GuiTool currentTool_;
     boost::shared_ptr<UndoStack> undoStack_;
+    SdlViewport viewport_;
   };
 
 }