Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / mainGL.cpp
diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp b/WCudaMSE/Student_Cuda_Image/src/cpp/core/mainGL.cpp
new file mode 100755 (executable)
index 0000000..44ee751
--- /dev/null
@@ -0,0 +1,77 @@
+#include <iostream>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include "GLUTImageViewers.h"\r
+\r
+#include "Device.h"\r
+#include "cudaTools.h"\r
+\r
+#include "Rippling0Provider.h"\r
+#include "RipplingProvider.h"\r
+\r
+using std::cout;\r
+using std::endl;\r
+using std::string;\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    Declaration                                     *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |*            Imported                *|\r
+ \*-------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |*            Public                  *|\r
+ \*-------------------------------------*/\r
+\r
+int mainGL(void);\r
+\r
+/*--------------------------------------*\\r
+ |*            Private                 *|\r
+ \*-------------------------------------*/\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    Implementation                                  *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+/*--------------------------------------*\\r
+ |*            Public                  *|\r
+ \*-------------------------------------*/\r
+\r
+int mainGL(void)\r
+    {\r
+    Rippling0Image* ptrRippling0 = Rippling0Provider::createGL();\r
+    Image* ptrRippling = RipplingProvider::createGL();\r
+    // TODO : Insert  autres Images ...\r
+\r
+    bool isAnimation = true;\r
+    bool isSelection = true;\r
+\r
+    GLUTImageViewers rippling0Viewer(ptrRippling0, isAnimation, isSelection, 0, 0);\r
+    GLUTImageViewers ripplingViewer(ptrRippling, isAnimation, isSelection, 10, 10);\r
+    // TODO : Insert here autres ImageViewers ...\r
+\r
+    GLUTImageViewers::runALL(); // Bloquant, Tant qu'une fenetre est ouverte\r
+\r
+    // destruction\r
+       {\r
+       delete ptrRippling0;\r
+       delete ptrRippling;\r
+\r
+       ptrRippling0 = NULL;\r
+       ptrRippling = NULL;\r
+       }\r
+\r
+    return EXIT_SUCCESS;\r
+    }\r
+\r
+/*--------------------------------------*\\r
+ |*            Private                 *|\r
+ \*-------------------------------------*/\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    End                                             *|\r
+ \*---------------------------------------------------------------------*/\r
+\r