Mercurial > hg > orthanc-stone
diff Samples/Sdl/TrackerSampleApp.h @ 893:0c5201499af8
Fixes to TrackerSampleApp following IViewport refactoring (FusionMprSdl not working yet)
Removal of the useless scene_ inside ViewportController
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 15 Jul 2019 12:48:19 +0200 |
parents | 0aff28f15ea2 |
children | a911f5bb48da |
line wrap: on
line diff
--- a/Samples/Sdl/TrackerSampleApp.h Thu Jul 11 09:18:55 2019 +0200 +++ b/Samples/Sdl/TrackerSampleApp.h Mon Jul 15 12:48:19 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_; }; }