Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / Student_OMP_Image / src / main.cpp
diff --git a/WCudaMSE/Student_OMP_Image/src/main.cpp b/WCudaMSE/Student_OMP_Image/src/main.cpp
new file mode 100755 (executable)
index 0000000..35cc2b0
--- /dev/null
@@ -0,0 +1,77 @@
+#include <iostream>
+
+#include "MathTools.h"
+#include "GLUTImageViewers.h"
+
+#include "RipplingProvider.h"
+
+using std::cout;
+using std::endl;
+
+/*----------------------------------------------------------------------*\
+ |*                    Declaration                                     *|
+ \*---------------------------------------------------------------------*/
+
+/*--------------------------------------*\
+ |*            Imported                *|
+ \*-------------------------------------*/
+
+/*--------------------------------------*\
+ |*            Public                  *|
+ \*-------------------------------------*/
+
+int main(int argc, char** argv);
+
+/*--------------------------------------*\
+ |*            Private                 *|
+ \*-------------------------------------*/
+
+static int run(void);
+
+/*----------------------------------------------------------------------*\
+ |*                    Implementation                                  *|
+ \*---------------------------------------------------------------------*/
+
+/*--------------------------------------*\
+ |*            Public                  *|
+ \*-------------------------------------*/
+
+int main(int argc, char** argv)
+    {
+    cout << "main" << endl;
+
+    GLUTImageViewers::init(argc, argv); // call once
+
+    return run(); // Bloquant, Tant qu'une fenetre est ouverte
+    }
+
+int run(void)
+    {
+    bool isAnimation = true;
+    bool isSelectionEnable = false;
+
+    RipplingImage* ptrRippling = RipplingProvider::create();
+
+    GLUTImageViewers ripplingViewer(ptrRippling, isAnimation, isSelectionEnable, 20, 20);
+    // Insert here other viewers ...
+
+    GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte
+
+    // destruction
+       {
+       delete ptrRippling;
+
+       ptrRippling = NULL;
+       }
+
+    return EXIT_SUCCESS;
+    }
+
+/*--------------------------------------*\
+ |*            Private                 *|
+ \*-------------------------------------*/
+
+/*----------------------------------------------------------------------*\
+ |*                    End                                             *|
+ \*---------------------------------------------------------------------*/
+