Ajout des cas de tests pour les TP non-graphiques. Cleanage en tous genres.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / Viewer.h
index d77be2a..eaa4f75 100644 (file)
@@ -12,10 +12,12 @@ class AutoViewer
         GLUTImageViewers viewer;
 
     public:
-        AutoViewer(bool isAnimation, bool isSelection, int pxFrame, int pyFrame):
+        AutoViewer(bool isAnimation, bool isSelection, int pxFrame, int pyFrame, bool run = true):
             ptrOutput(TProvider::createGL()),
             viewer(ptrOutput, isAnimation, isSelection, pxFrame, pyFrame)
             {
+            if (run)
+                GLUTImageViewers::runALL();
             }
 
         ~AutoViewer()
@@ -33,10 +35,12 @@ class Viewer
         GLUTImageViewers viewer;
 
     public:
-        Viewer(TOutput* output, bool isAnimation, bool isSelection, int pxFrame, int pyFrame):
+        Viewer(TOutput* output, bool isAnimation, bool isSelection, int pxFrame, int pyFrame, bool run = true):
             ptrOutput(output),
             viewer(ptrOutput, isAnimation, isSelection, pxFrame, pyFrame)
             {
+            if (run)
+                GLUTImageViewers::runALL();
             }
 
         ~Viewer()